View Full Version : 1bit textures

03-25-2001, 11:28 PM
hi, this is not really an advanced topic, but i have never seen it used : i would like to store some textures (fonts) using 1bit per pixel into the video card memory - that would allow me to store a lot of fonts http://www.opengl.org/discussion_boards/ubb/smile.gif
I've tried to do that using
glTeximage2D (GL_TEXTURE_2D, 0, GL_ALPHA, width, height, 0, GL_COLOR_INDEX, GL_BITMAP, bitmap1bit);
but all it does is giving me a black texture (all works well when i use a 8bit texture with glTexImage2D (GL_TEXTURE_2D, 0, GL_ALPHA8, width, height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, bitmap8bit)).
I've been playing a bit with the glPixelMap settings, but i can't see any difference...
Thank you

03-26-2001, 11:22 AM
maybe try GL_LUMINANCE4 for the texture internal format but most likely most drivers will give you GL_LUMINANCE8 instead http://www.opengl.org/discussion_boards/ubb/frown.gif.
see the texture internal formats demo on my site. (in profile)

03-26-2001, 02:22 PM
I think you want to use bitmaps not textures.

03-26-2001, 10:21 PM
I find bitmaps a bit slow, and that don't allow me to do some special effects.
Thanks, i'm gonna try luminance instead.