vorbisus
06-11-2001, 06:09 AM
I hate to have to ask this, because it seems like it ought to be quite easy. I just can get glDrawPixels to display anything on the screen.
I use glDrawPixels(256,256,GL_COLOR_INDEX,GL_BITMAP,(uns igned char*)bitmapdata);
I get nothing. What should be equivalent code based on MSDN help: glBitmap(256,256,0,0,0,0,(unsigned char*)bitmapdata); works... sort of. I can use it display data with 1-bit color information (display white pixels on a black background).
My data is RGBA format.
My question is, am I missing some kind of initialization? Does anyone have a tutorial for using glDrawPixels and/or glBitmap?
I can't find this in NeHe or the Redbook... my best resources.
And... the second part of my question:
I can get TextureMapping to work, and display a Quad at the appropriate distance for viewing the bitmap... but it seems to me, though I could be wrong, that this wouldn't be nearly as fast as a Block Transfer of the pixels. Both should be supported by hardware. Also, other threads on this forum are saying that Texturing to a quad is lossy... does anyone know the performance different between glDrawPixels, and Texture Mapping? (assuming glDrawPixels uses hardware Blting).
Thanks in advance.
Mike.
I use glDrawPixels(256,256,GL_COLOR_INDEX,GL_BITMAP,(uns igned char*)bitmapdata);
I get nothing. What should be equivalent code based on MSDN help: glBitmap(256,256,0,0,0,0,(unsigned char*)bitmapdata); works... sort of. I can use it display data with 1-bit color information (display white pixels on a black background).
My data is RGBA format.
My question is, am I missing some kind of initialization? Does anyone have a tutorial for using glDrawPixels and/or glBitmap?
I can't find this in NeHe or the Redbook... my best resources.
And... the second part of my question:
I can get TextureMapping to work, and display a Quad at the appropriate distance for viewing the bitmap... but it seems to me, though I could be wrong, that this wouldn't be nearly as fast as a Block Transfer of the pixels. Both should be supported by hardware. Also, other threads on this forum are saying that Texturing to a quad is lossy... does anyone know the performance different between glDrawPixels, and Texture Mapping? (assuming glDrawPixels uses hardware Blting).
Thanks in advance.
Mike.