mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-24 06:04:27 +00:00
Use GLSM instead of relying on the redirector
This commit is contained in:
1 parent
70cfa2ae90
commit
5f61e387fb
84 files changed
+628
-1140
No files matched your search
@@ -1,24 +1,25 @@
|
||||
package com.prupe.mcpatcher.mal.resource;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL14;
|
||||
import org.lwjgl.opengl.GLContext;
|
||||
|
||||
import com.gtnewhorizons.angelica.glsm.GLStateManager;
|
||||
|
||||
public class GLAPI {
|
||||
|
||||
private static final boolean useGlBlendFuncSeparate = GLContext.getCapabilities().OpenGL14;
|
||||
|
||||
public static void glBindTexture(int texture) {
|
||||
if (texture >= 0) {
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture);
|
||||
GLStateManager.glBindTexture(GL11.GL_TEXTURE_2D, texture);
|
||||
}
|
||||
}
|
||||
|
||||
public static void glBlendFuncSeparate(int src, int dst, int srcAlpha, int dstAlpha) {
|
||||
if (useGlBlendFuncSeparate) {
|
||||
GL14.glBlendFuncSeparate(src, dst, srcAlpha, dstAlpha);
|
||||
GLStateManager.glBlendFuncSeparate(src, dst, srcAlpha, dstAlpha);
|
||||
} else {
|
||||
GL11.glBlendFunc(src, dst);
|
||||
GLStateManager.glBlendFunc(src, dst);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user