NeHe Lesson 8? I downloaded and ran the JOGL bytecode. It rendered a solid cube here, no transparency in sight…
I doubt it is my openGL driver, it is working perfectly with every other openGL program. I am using a Geforce 6800 gt, with the newest drivers.
My code is extremely simple:
init:
int maskTextureID=readtexture… //read png texture with alpha channel
gl.glEnable(GL.GL_TEXTURE_2D);
gl.glEnable ( GL.GL_BLEND );
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
gl.glEnable(GL.GL_TEXTURE_2D);
gl.glBindTexture(GL.GL_TEXTURE_2D,maskTextureID);
display:
gl.glClear(GL.GL_COLOR_BUFFER_BIT);
gl.glBegin(GL.GL_QUADS);
gl.glTexCoord2f(0,0);
gl.glVertex3f(-100.0f, -100.0f, 0.0f);
gl.glTexCoord2f(1,0);
gl.glVertex3f( 100.0f, -100.0f, 0.0f);
gl.glTexCoord2f(1,1);
gl.glVertex3f( 100.0f,100.0f, 0.0f);
gl.glTexCoord2f(0,1);
gl.glVertex3f(-100.0f,100.0f, 0.0f);
gl.glEnd();
If you have any examples proven to work in JOGL, I would be grateful if you can post them…
Did you see transparency in JOGL yourself?