diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8b4c716..e91df1a 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,12 +2,8 @@ - - - - - + @@ -23,7 +19,68 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -535,7 +592,7 @@ - + @@ -546,7 +603,7 @@ - + @@ -924,50 +981,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -990,8 +1003,48 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/shaders/main.frag b/res/shaders/main.frag index f3ebea8..c8be351 100644 --- a/res/shaders/main.frag +++ b/res/shaders/main.frag @@ -1,4 +1,4 @@ -#version 330 +#version 150 //Il n’y a pas de layout(location=i) dans OpenGL < 3.3, mais tu peux utiliser glFragData[i] = myvalue à la place. uniform sampler2D materialTex; uniform vec4 color; @@ -6,8 +6,8 @@ uniform vec4 color; in vec2 fragTexCoord; in vec3 fragVert; -layout(location = 0) out vec4 finalColor; +//layout(location = 0) out vec4 finalColor; void main() { - finalColor = texture(materialTex, fragTexCoord) * color; + gl_FragData[0] = texture(materialTex, fragTexCoord) * color; } \ No newline at end of file diff --git a/src/globalgamejam/render/FrameBufferObject.java b/src/globalgamejam/render/FrameBufferObject.java index d08f475..9f71c66 100644 --- a/src/globalgamejam/render/FrameBufferObject.java +++ b/src/globalgamejam/render/FrameBufferObject.java @@ -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; diff --git a/src/globalgamejam/render/Shaders.java b/src/globalgamejam/render/Shaders.java index 71f83a6..ad9c2f8 100644 --- a/src/globalgamejam/render/Shaders.java +++ b/src/globalgamejam/render/Shaders.java @@ -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);