View Full Version : Drawing 16-bit-gray texture onto geometry in 32-bit-gray rendering context

03-20-2014, 06:59 AM
Is it possible in a hardware-accelerated way under OpenGL to draw a 16-bit-gray (GL_R16UI?) texture onto a 32-bit-gray (GL_R32UI?) off-screen rendering context?

I think that I might have figured out how to load the texture data, but I've mucked around and can't seem to get an appropriate rendering context. I've tried both to get a more recent FBO surface and an older PBO context. I'm running under Debian GNU/Linux unstable with NVIDIA NVS 5200M hardware and NVIDIA's proprietary driver.

I have some monochrome data with 16 bits per pixel of gray. I'd like to use each data frame as a texture and draw it onto some simple geometry.

I'd like to set up a drawing context in which each pixel has 24 or 32 bits of gray. Single (monochrome) "color" buffer. No depth buffer. Each time I draw a new frame of image data, I'd like to add the result to what is already in the color buffer.

A long time ago, I wrote a lot of OpenGL code, but I went away while everything changed to shaders.

It would be really cool if this could be done even with pre-shader-style OpenGL.

Thanks ahead of time to anyone who might be able to help.