Bug on non-multitextured hw

Started by Orangy Tang, September 26, 2009, 18:39:08

Previous topic - Next topic

Orangy Tang

On irc, a certain MrBear posted this exception when trying to use LWJGL in JME: http://www.jmonkeyengine.com/forum/index.php?PHPSESSID=24c4613c37822ef36779085ace2e3b82&topic=12182.15

Poking into the GL11 source shows that it's triggered by line 7 here: http://lwjgl.pastebin.com/m6e71467d

From what I can tell, the code is going via line 65 here: http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java?revision=3237&view=markup and setting max_texture_units to 0 (and hence glTexCoordPointer_buffer to be zero-length, causing the exception).

MrBear seemed to be running on some kind of linux software renderer, I'm guessing that this would affect anything with no multitexturing, but since that's pretty rare these days it's been overlooked. The obvious fix would be to have max_texture_units set to 1 in this case, but I don't know if that could have any undesirable side effects, I'm sure you guys would be able to judge that better than me.

spasi


Orangy Tang