• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Main repository of MikuMikuStudio


Commit MetaInfo

Revisiónbd3fc442b680609a6030c9f72beada97e810c5e8 (tree)
Tiempo2013-03-02 02:24:51
Autorjulien.gouesse@gmail.com <julien.gouesse@gmai...>
Commiterjulien.gouesse@gmail.com

Log Message

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

Cambiar Resumen

Diferencia incremental

--- a/engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java
+++ b/engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java
@@ -69,6 +69,7 @@ import java.util.EnumSet;
6969 import java.util.List;
7070 import java.util.logging.Level;
7171 import java.util.logging.Logger;
72+import javax.media.nativewindow.NativeWindowFactory;
7273 import javax.media.opengl.GL;
7374 import javax.media.opengl.GL2;
7475 import javax.media.opengl.GL2ES1;
@@ -188,13 +189,15 @@ public class JoglRenderer implements Renderer {
188189 versionStr = versionStr.substring(0, spaceIdx);
189190 }
190191
191- //FIXME revisit this fix later
192192 try {
193193 float version = Float.parseFloat(versionStr);
194194 glslVer = (int) (version * 100);
195195 } 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+ }
198201 }
199202
200203 switch (glslVer) {