LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: EricTheRed on March 18, 2004, 00:57:06

Title: lwjgl bug: GL_ARB_vertex_program
Post by: EricTheRed on March 18, 2004, 00:57:06
For once it actually is lwjgl's fault! :)

I've found a bug in the initialization code for ARB programs. It exists in org_lwjgl_opengl_ARBProgram.cpp. Here's the offending code:

void extgl_InitARBProgram(JNIEnv *env, jobject ext_set)
{
if (!extgl_Extensions.GL_ARB_fragment_program)
return;
<...snip!...>
}

In situations where a card supports GL_ARB_vertex_program but not the newer GL_ARB_fragment_program, this causes the ARB program methods to be incorrectly disabled. It also has the nasty side effect of causing the lovely "An unexpected exception has been detected in native code outside the VM." error if one attempts to use the methods.

My first-generation GeForce3 is an example of a card supporting vertex but not fragment programs. The Radeon 8500 might also be another example?

Thanks.
Title: lwjgl bug: GL_ARB_vertex_program
Post by: elias on March 18, 2004, 09:44:04
That particular bug is fixed in CVS. The NVProgram had the same problem.

- elias
Title: lwjgl bug: GL_ARB_vertex_program
Post by: EricTheRed on March 19, 2004, 02:42:47
Ah. I missed that. Apolgies, then. Good to know, however, that it is fixed!