1
0
Fork 0

Compatibility fixes for Shaders 1.5

This commit is contained in:
MrDev023 2017-01-14 19:40:44 +01:00
parent eda25cf2c9
commit ae3320e067
4 changed files with 114 additions and 64 deletions

View file

@ -2,11 +2,8 @@ package globalgamejam.render;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL30.*;
import static org.lwjgl.opengl.GL32.*;
import globalgamejam.Main;
import globalgamejam.math.Matrix4f;
import globalgamejam.math.Vector2f;
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL13;

View file

@ -38,14 +38,14 @@ public class Shaders {
System.err.println(glGetShaderInfoLog(vert, 2048));
System.exit(1);
}else{
System.out.println("Vertex compiled !");
System.out.println(vertexFile + " compiled !");
}
glCompileShader(frag);
if (glGetShaderi(frag, GL_COMPILE_STATUS) == GL_FALSE) {
System.err.println(glGetShaderInfoLog(frag, 2048));
System.exit(1);
}else{
System.out.println("Fragment compiled !");
System.out.println(fragmentFile + " compiled !");
}
glAttachShader(program, vert);
glAttachShader(program, frag);