LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Orangy Tang on September 26, 2009, 18:39:08

Title: Bug on non-multitextured hw
Post by: Orangy Tang on September 26, 2009, 18:39:08
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.
Title: Re: Bug on non-multitextured hw
Post by: spasi on September 27, 2009, 12:05:59
Fixed.
Title: Re: Bug on non-multitextured hw
Post by: Orangy Tang on September 27, 2009, 13:50:38
Sweet, thanks.