LWJGL Bug Report...

hi everybody…
i think i’ve found a bug… i wrote two java programs : one with lwjgl, and the other with gl4java (exactly the same program), but the output is different !
look at this piece of code :

gl.begin(GL.QUADS);
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f(-13.3f, -10.0f, 10.0f);
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f( 13.3f, -10.0f, 10.0f);
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f( 13.3f, 10.0f, 10.0f);
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f(-13.3f, 10.0f, 10.0f);
gl.end();

and look at the gl4java’s one :

gl.glBegin(GL_QUADS);
gl.glTexCoord2f(0.0f, 0.0f); gl.glVertex3f(-13.3f, -10.0f, 10.0f);
gl.glTexCoord2f(1.0f, 0.0f); gl.glVertex3f( 13.3f, -10.0f, 10.0f);
gl.glTexCoord2f(1.0f, 1.0f); gl.glVertex3f( 13.3f, 10.0f, 10.0f);
gl.glTexCoord2f(0.0f, 1.0f); gl.glVertex3f(-13.3f, 10.0f, 10.0f);
gl.glEnd();

you see, it’s the same things… but when i run the lwjgl program, the texture coordinates are inverted… i don’t know if you understand me because i don’t speak english very well (french…)…

please help… i can’t find a solution…
++
Ch*man

I can categorically state (famous last words!) that it’s not LWJGL, and the problem lies somewhere in texture loading. I know it works properly - because all of my code uses it and it does what I expect it to - so something different is happening under GL4Java.

Cas :slight_smile:

You’re gonna have to make a C++ program that uses the API exactly the same way to see what the ‘tie-breaking’ result is.

-Chris

Under LWJGL (and straight C), the quad drawn by that code should look “upsidedown” from the texture as loaded. If this ain’t happening in GL4Java it’s because GL4Java is inverting the texture for you. Which is a bit naughty as it shouldn’t, you should either knowingly invert your textures, or like I do, swap the 1.0s and 0.0s texture T coordinates around.

Cas :slight_smile:

thx! now it works…

Ch*man