forked from CaffeineMC/sodium
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiple misc changes to shader interfaces
- Loading branch information
Showing
21 changed files
with
216 additions
and
147 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
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
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
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
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
15 changes: 15 additions & 0 deletions
15
common/src/main/java/net/caffeinemc/mods/sodium/client/gl/shader/ShaderType.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 |
---|---|---|
@@ -1,17 +1,32 @@ | ||
package net.caffeinemc.mods.sodium.client.gl.shader; | ||
|
||
import org.lwjgl.opengl.GL20C; | ||
import org.lwjgl.opengl.GL32C; | ||
import org.lwjgl.opengl.GL40C; | ||
|
||
/** | ||
* An enumeration over the supported OpenGL shader types. | ||
*/ | ||
public enum ShaderType { | ||
VERTEX(GL20C.GL_VERTEX_SHADER), | ||
GEOMETRY(GL32C.GL_GEOMETRY_SHADER), | ||
TESS_CONTROL(GL40C.GL_TESS_CONTROL_SHADER), | ||
TESS_EVALUATION(GL40C.GL_TESS_EVALUATION_SHADER), | ||
FRAGMENT(GL20C.GL_FRAGMENT_SHADER); | ||
|
||
public final int id; | ||
|
||
ShaderType(int id) { | ||
this.id = id; | ||
} | ||
|
||
public static ShaderType fromGlShaderType(int id) { | ||
for (ShaderType type : values()) { | ||
if (type.id == id) { | ||
return type; | ||
} | ||
} | ||
|
||
return null; | ||
} | ||
} |
6 changes: 5 additions & 1 deletion
6
common/src/main/java/net/caffeinemc/mods/sodium/client/gl/tessellation/GlPrimitiveType.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
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
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
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
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.