Main repository of MikuMikuStudio
Revisión | bd3fc442b680609a6030c9f72beada97e810c5e8 (tree) |
---|---|
Tiempo | 2013-03-02 02:24:51 |
Autor | julien.gouesse@gmail.com <julien.gouesse@gmai...> |
Commiter | julien.gouesse@gmail.com |
Tolerates a failure in the parsing of GLSL version string and then assumes GLSL 1.00 is supported only on the Raspberry Pi
git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@10455 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
@@ -69,6 +69,7 @@ import java.util.EnumSet; | ||
69 | 69 | import java.util.List; |
70 | 70 | import java.util.logging.Level; |
71 | 71 | import java.util.logging.Logger; |
72 | +import javax.media.nativewindow.NativeWindowFactory; | |
72 | 73 | import javax.media.opengl.GL; |
73 | 74 | import javax.media.opengl.GL2; |
74 | 75 | import javax.media.opengl.GL2ES1; |
@@ -188,13 +189,15 @@ public class JoglRenderer implements Renderer { | ||
188 | 189 | versionStr = versionStr.substring(0, spaceIdx); |
189 | 190 | } |
190 | 191 | |
191 | - //FIXME revisit this fix later | |
192 | 192 | try { |
193 | 193 | float version = Float.parseFloat(versionStr); |
194 | 194 | glslVer = (int) (version * 100); |
195 | 195 | } catch (NumberFormatException e) { |
196 | - logger.warning("Failed parsing GLSL version assuming it's v1.00"); | |
197 | - glslVer = 100; | |
196 | + // the parsing fails on Raspberry Pi | |
197 | + if (NativeWindowFactory.getNativeWindowType(false).equals(NativeWindowFactory.TYPE_BCM_VC_IV)) { | |
198 | + logger.warning("Failed parsing GLSL version assuming it's v1.00"); | |
199 | + glslVer = 100; | |
200 | + } | |
198 | 201 | } |
199 | 202 | |
200 | 203 | switch (glslVer) { |