PDA

View Full Version : How do I load a grayscale bitmap?



lucidmm
12-10-2002, 11:37 AM
Each pixel is one byte.
What is the correct call to glTexImage2D?

Old GLman
12-10-2002, 11:41 AM
It would most likely be:



glTexImage2D(GL_TEXTURE_2D,0,GL_LUMINANCE8,width,h eight,0,GL_LUMINANCE,GL_UNSIGNED_BYTE,data);


Ofcourse, change parameters where necessary.

Old GLman

lucidmm
12-10-2002, 11:50 AM
that did it. THANKS!

http://www.opengl.org/discussion_boards/ubb/smile.gif