hugoloza / quake2-gwt-port

Automatically exported from code.google.com/p/quake2-gwt-port
GNU General Public License v2.0
0 stars 0 forks source link

Version string is incorrectly parsed as OpenGL when it is OpenGL ES #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Choose a Chromium build after CL 45293
(http://src.chromium.org/viewvc/chrome?view=rev&revision=45293), so
probably something from April 24, 2010, and onwards should be ok.  Try to
connect to the Quake II GWT Port server.

This error will pop up in the JS console:
java.lang.NumberFormatException: For input string: "Ope"

What is happening is that the port is expecting "#.#" being returned by the
version string, and it is trying to parse that as a float (I remember
seeing that code).  However, that is the OpenGL convention.  OpenGL ES
returns "OpenGL ES #.# vendor-specific".  So when this string is parsed, it
breaks.

I don't know if the bug is in the GWT port code, or the Jake2 port code
(I'd guess the later), but it has to be amended.  This is also important
because since this is ES, there may be features that are missing from
desktop OGL.

Original issue reported on code.google.com by robbies on 11 May 2010 at 11:29

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/quake2-gwt-port/issues/detail?id=22 provides additional
reports of this bug.

Original comment by timothy....@gmail.com on 18 May 2010 at 10:57

GoogleCodeExporter commented 9 years ago
I posted a fix for this in issue 22, but I'll post it here as well since this 
clearly 
describes the error:

Error is caused by code in: src/jake2/render/glconfig_t.java

The fix I came up with was to change line 39 from:
version = Float.parseFloat(version_string.substring(0,3));
to:
version = version_string.replace("[^0-9\\.]+", "");

Rebuild and reinstall after changing the line number and it should get you pass 
the 
error reported until this issue is fixed.

Original comment by samr...@gmail.com on 27 May 2010 at 4:01

GoogleCodeExporter commented 9 years ago
fixed in the repository

Original comment by stefan.haustein on 5 Jul 2010 at 10:56