-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
500 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/ladysnake/satin/api/experimental/managed/SamplerUniform.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package ladysnake.satin.api.experimental.managed; | ||
|
||
import net.minecraft.client.gl.GlFramebuffer; | ||
import net.minecraft.client.texture.Texture; | ||
import org.apiguardian.api.API; | ||
|
||
import static org.apiguardian.api.API.Status.EXPERIMENTAL; | ||
|
||
public interface SamplerUniform { | ||
/** | ||
* Sets the value of a sampler uniform declared in json | ||
* | ||
* @param texture a texture object | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
void set(Texture texture); | ||
|
||
/** | ||
* Sets the value of a sampler uniform declared in json | ||
* | ||
* @param textureFbo a framebuffer which main texture will be used | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
void set(GlFramebuffer textureFbo); | ||
|
||
/** | ||
* Sets the value of a sampler uniform declared in json | ||
* | ||
* @param textureName an opengl texture name | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
void set(int textureName); | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/ladysnake/satin/api/experimental/managed/Uniform1f.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package ladysnake.satin.api.experimental.managed; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
import static org.apiguardian.api.API.Status.EXPERIMENTAL; | ||
|
||
public interface Uniform1f { | ||
|
||
/** | ||
* Sets the value of a uniform | ||
* | ||
* @param value float value | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
void set(float value); | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/ladysnake/satin/api/experimental/managed/Uniform1i.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package ladysnake.satin.api.experimental.managed; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
import static org.apiguardian.api.API.Status.EXPERIMENTAL; | ||
|
||
public interface Uniform1i { | ||
/** | ||
* Sets the value of this uniform | ||
* | ||
* @param value int value | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
void set(int value); | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/ladysnake/satin/api/experimental/managed/Uniform2f.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ladysnake.satin.api.experimental.managed; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
import static org.apiguardian.api.API.Status.EXPERIMENTAL; | ||
|
||
public interface Uniform2f { | ||
|
||
/** | ||
* Sets the value of a uniform declared in json | ||
* | ||
* @param value0 float value | ||
* @param value1 float value | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
void set(float value0, float value1); | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/ladysnake/satin/api/experimental/managed/Uniform2i.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package ladysnake.satin.api.experimental.managed; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
import static org.apiguardian.api.API.Status.EXPERIMENTAL; | ||
|
||
public interface Uniform2i { | ||
/** | ||
* Sets the value of a uniform | ||
* | ||
* @param value0 int value | ||
* @param value1 int value | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
void set(int value0, int value1); | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/ladysnake/satin/api/experimental/managed/Uniform3f.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ladysnake.satin.api.experimental.managed; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
import static org.apiguardian.api.API.Status.EXPERIMENTAL; | ||
|
||
public interface Uniform3f { | ||
|
||
/** | ||
* Sets the value of a uniform declared in json | ||
* | ||
* @param value0 float value | ||
* @param value1 float value | ||
* @param value2 float value | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
void set(float value0, float value1, float value2); | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/ladysnake/satin/api/experimental/managed/Uniform3i.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package ladysnake.satin.api.experimental.managed; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
import static org.apiguardian.api.API.Status.EXPERIMENTAL; | ||
|
||
public interface Uniform3i { | ||
/** | ||
* Sets the value of a uniform | ||
* | ||
* @param value0 int value | ||
* @param value1 int value | ||
* @param value2 int value | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
void set(int value0, int value1, int value2); | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/ladysnake/satin/api/experimental/managed/Uniform4f.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package ladysnake.satin.api.experimental.managed; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
import static org.apiguardian.api.API.Status.EXPERIMENTAL; | ||
|
||
public interface Uniform4f { | ||
|
||
/** | ||
* Sets the value of a uniform declared in json | ||
* | ||
* @param value0 float value | ||
* @param value1 float value | ||
* @param value2 float value | ||
* @param value3 float value | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
void set(float value0, float value1, float value2, float value3); | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/ladysnake/satin/api/experimental/managed/Uniform4i.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ladysnake.satin.api.experimental.managed; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
import static org.apiguardian.api.API.Status.EXPERIMENTAL; | ||
|
||
public interface Uniform4i { | ||
/** | ||
* Sets the value of a uniform declared in json | ||
* | ||
* @param value0 int value | ||
* @param value1 int value | ||
* @param value2 int value | ||
* @param value3 int value | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
void set(int value0, int value1, int value2, int value3); | ||
} |
80 changes: 80 additions & 0 deletions
80
src/main/java/ladysnake/satin/api/experimental/managed/UniformFinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package ladysnake.satin.api.experimental.managed; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
import static org.apiguardian.api.API.Status.EXPERIMENTAL; | ||
|
||
public interface UniformFinder { | ||
/** | ||
* Finds a uniform declared in json | ||
* | ||
* @param uniformName the name of the uniform field in the shader source file | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
Uniform1i findUniform1i(String uniformName); | ||
|
||
/** | ||
* Finds a uniform declared in json | ||
* | ||
* @param uniformName the name of the uniform field in the shader source file | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
Uniform2i findUniform2i(String uniformName); | ||
|
||
/** | ||
* Finds a uniform declared in json | ||
* | ||
* @param uniformName the name of the uniform field in the shader source file | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
Uniform3i findUniform3i(String uniformName); | ||
|
||
/** | ||
* Finds a uniform declared in json | ||
* | ||
* @param uniformName the name of the uniform field in the shader source file | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
Uniform4i findUniform4i(String uniformName); | ||
|
||
/** | ||
* Finds a uniform declared in json | ||
* | ||
* @param uniformName the name of the uniform field in the shader source file | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
Uniform1f findUniform1f(String uniformName); | ||
|
||
/** | ||
* Finds a uniform declared in json | ||
* | ||
* @param uniformName the name of the uniform field in the shader source file | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
Uniform2f findUniform2f(String uniformName); | ||
|
||
/** | ||
* Finds a uniform declared in json | ||
* | ||
* @param uniformName the name of the uniform field in the shader source file | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
Uniform3f findUniform3f(String uniformName); | ||
|
||
/** | ||
* Finds a uniform declared in json | ||
* | ||
* @param uniformName the name of the uniform field in the shader source file | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
Uniform4f findUniform4f(String uniformName); | ||
|
||
/** | ||
* Finds a uniform declared in json | ||
* | ||
* @param uniformName the name of the uniform field in the shader source file | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
UniformMat4 findUniformMat4(String uniformName); | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/ladysnake/satin/api/experimental/managed/UniformMat4.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ladysnake.satin.api.experimental.managed; | ||
|
||
import net.minecraft.client.util.math.Matrix4f; | ||
import org.apiguardian.api.API; | ||
|
||
import static org.apiguardian.api.API.Status.EXPERIMENTAL; | ||
|
||
public interface UniformMat4 { | ||
|
||
/** | ||
* Sets the value of a 4x4 matrix uniform | ||
* | ||
* @param value a matrix | ||
*/ | ||
@API(status = EXPERIMENTAL, since = "1.3.0") | ||
void set(Matrix4f value); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.