From 68cb1e900f13c7187c2c2f5c311038382756a60b Mon Sep 17 00:00:00 2001 From: shadowislord Date: Sun, 1 Jun 2014 14:59:17 -0400 Subject: [PATCH] Automatically upload GLSL 1.0 shaders as GLSL 1.1 if using desktop OpenGL to allow stricter error checking. --- .../src/main/java/com/jme3/renderer/lwjgl/LwjglRenderer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglRenderer.java b/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglRenderer.java index b1c2df7ce..100a07201 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglRenderer.java +++ b/jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglRenderer.java @@ -986,6 +986,10 @@ public class LwjglRenderer implements Renderer { stringBuf.append(" core"); } stringBuf.append("\n"); + } else { + // version 100 does not exist in desktop GLSL. + // put version 110 in that case to enable strict checking + stringBuf.append("#version 110\n"); } } updateNameBuffer();