View Full Version : Storing data in buffer

10-09-2004, 07:42 AM

I want to store image data in auxiliary buffer in order to draw them faster to color buffer (I'm using glCopyPixels). My problem is the glRasterPos* function? If I want to store data at position (0, 0) it might be that this does not corresponed with color buffer and I'm getting a invalid rater position. I don't understand how data is stored in buffers at all!! Why can't i get a pointer to a buffer??

Can anyone help me?

Many thanks

10-09-2004, 12:44 PM
You can't get a pointer to a buffer because OpenGL is a client/server model. Typically, for performance, graphics cards will swizzle their actual internal buffers anyway, so a pointer wouldn't do you much good without intimate internal knowledge of the specific hardware.

The best performance in getting pixels onto the screen is usually had by storing the pixels in a texture, and drawing a single quad with that texture applied, and GL_NEAREST filtering mode.

10-10-2004, 01:29 AM
Thanks jwatte for answering, i will try doing that...

regards Jupp

10-10-2004, 02:49 AM
It's also a good idea to use mipmaps to make use of any texture caches (lookups for a minified texture are close in a mipmap but spread out in a non-mipmapped texture).