View Full Version : glBitmap();

12-03-2000, 12:33 AM
How do you load a bitmap from a file and then use it with glBitmap.

I've no idea, hope you have...

12-03-2000, 12:53 AM
I never knew there was a funtion called glBitmap. What does it do??

12-03-2000, 01:34 AM
It draws bitmaps. But NOT images. By bitmaps, OGL means arrays of pixels but ON/OFF pixels not images : if a bit is a 1 that means draw a pixel, if it's 0, don't draw (the pixels are drawn using the default color). This is usually used for such things as drawing text on the screen by defining fonts as bitmaps. to draw images, you can either use textured polygons or glDrawPixels.

PS: Red book chapter 8 : http://helios.scripps.edu/cgi-bin/infosr...OpenGL_PG/14979 (http://helios.scripps.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_PG/14979)

[This message has been edited by Moz (edited 12-03-2000).]

12-03-2000, 11:13 PM
I used to do that, use glDrawPixels, i mean.
but i found out that it's around 400x faster to draw a tm quad, and it only takes a couple more lines of code (considering you have a -1,1 orthogonal matrix setup) and 2 multiplies

dunno, just something i found out the hard way http://www.opengl.org/discussion_boards/ubb/wink.gif

12-04-2000, 03:08 AM
Yes, it's actually much faster ... if you have the hardware. If you're in software rendering, I think glDrawPixels is faster even though I can hardly see any difference.