Hi Markus,
Thank you for replying.
I incorporated your color4f suggestion - but the problem still persists.
here is the display() method (performed whenever a new picture has been loaded or a modification such as RGBA change has been requested):
============
//tex contains the texture info of the current image
//currByteBuffer contains the actual pixel data
gl.glPushMatrix();
gl.glBindTexture(GL.GL_TEXTURE_2D, tex.getTextureID());
gl.glBegin(GL.GL_QUADS); //this is same as in VSPUnit
gl.glTexCoord2f(tex2DQuad[0], tex2DQuad[1]);
gl.glVertex3f(tex3DQuad[0], tex3DQuad[1], 0.0f);
gl.glTexCoord2f(tex2DQuad[2], tex2DQuad[3]);
gl.glVertex3f(tex3DQuad[2], tex3DQuad[3], 0.0f);
gl.glTexCoord2f(tex2DQuad[4], tex2DQuad[5]);
gl.glVertex3f(tex3DQuad[4], tex3DQuad[5], 0.0f);
gl.glTexCoord2f(tex2DQuad[6], tex2DQuad[7]);
gl.glVertex3f(tex3DQuad[6], tex3DQuad[7], 0.0f);
gl.glEnd();
if (pixelTransferRequested) {
pixelTransferRequested = false;
gl.glColor4f(redV, greenV, blueV, opacityV);
}
gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, 4, actualWidth, kHeight, 0, srcPixelFormat, GL.GL_UNSIGNED_BYTE, currByteBuffer);
gl.glPopMatrix();
gl.glFlush();
in a separate thread i load the images (once for stills, continuously for video).
my init() that is performed just once in the beginning is:
GL gl = drawable.getGL();
drawable.setGL(new DebugGL(drawable.getGL()));
gl.glEnable(GL.GL_TEXTURE_2D);
gl.glClearColor(0.0F, 0.0F, 0.0F, 0.0F);
gl.glClearDepth(1.0); //clear the entire buffer
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
gl.glEnable(GL.GL_BLEND);
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
gl.glColor4f(1.0f, 1.0f, 1.0f, 0.5F);
gl.glViewport(0, 0, width, height);
gl.glShadeModel(GL.GL_SMOOTH);
gl.glEnable(GL.GL_DEPTH_TEST);
gl.glDepthFunc(GL.GL_LEQUAL);
gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_FASTEST);
gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);
gl.glTexParameterf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);
finally, in the display() method of the higher-up object (the one that controls the two texture objects), i clear the screen each time before displaying the two textures:
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
Any ideas?
Thanks a lot!
Jill