GL_UNSIGNED_INT_8_8_8_8_REV

Just wondering, does anyone here use the
GL_UNSIGNED_INT_8_8_8_8_REV data format
when updating your textures? E.g:


gl.glTexSubImage2D(target,
		   level,
		   0, // x-offset
		   0, // y-offset
		   image.width, // src width
		   image.height,// src height
		   GL.GL_BGRA,
		   GL.GL_UNSIGNED_INT_8_8_8_8_REV,
		   image.pixels);	

The advantage of using this is so that Java2D
can render in its fast native pixel format (ARGB)
and you don’t have to manually swizzle the pixels
to OpenGL’s fast BGRA format.

What are your experiences with GL_UNSIGNED_INT_8_8_8_8_REV?
Is it fast? Do you know if the conversion is done
in software (driver) or in hardware (GPU)? Is this
similiarly fast on MacOSX? Thanks…

.rex

The GLJPanel uses the GL_UNSIGNED_INT_8_8_8_8_REV format on all platforms when reading back the pixels from its pbuffer. This format seems to perform pretty well on all platforms and hardware.

Thanks Ken, that’s very good to know!

I only have nVidia 6600GT and ATI X700
to test with and they seem to perform at
same level as GL_UNSIGNED_INT_8_8_8_8
but I wanted to be sure before committing.

.rex