From 36e6eb7fdc487d439994eb8a3e6fe45761a7af63 Mon Sep 17 00:00:00 2001 From: "jul..om" Date: Fri, 1 Feb 2013 22:09:54 +0000 Subject: [PATCH] Improves OpenGL-ES support (especially for Raspberry Pi), contribution of Erkki Nokso-Koivisto, fetches the GLSL version correctly when using ES2 git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10301 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/jogl/com/jme3/renderer/jogl/JoglRenderer.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java b/engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java index ae2ab1f02..e9f9bb88e 100644 --- a/engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java +++ b/engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java @@ -188,8 +188,14 @@ public class JoglRenderer implements Renderer { versionStr = versionStr.substring(0, spaceIdx); } - float version = Float.parseFloat(versionStr); - glslVer = (int) (version * 100); + //FIXME revisit this fix later + try { + float version = Float.parseFloat(versionStr); + glslVer = (int) (version * 100); + } catch (NumberFormatException e) { + logger.warning("Failed parsing GLSL version assuming it's v1.00"); + glslVer = 100; + } switch (glslVer) { default: