View Full Version : 1bpp texture
i've got a black and white bitmap, 8 pixels fits in one byte. and i want to use this bitmap as a texture, making it transparent when zeroes are and solid where are ones (or vice-versa - 0 solid, 1 transparent)
i just need to know which texture format something could handle it...
is it possible?
[This message has been edited by miko (edited 03-31-2003).]
Probably GL_LUMINANCE format is what you need but don't expect this to be havily optimized. It is very unlikely that 8 texels will be packed into a single byte for various reasons.
BTW, I hope to be in wrong.
GL_LUMNINACE could work only for bytes but not for bits. i checked gl reference and combination of GL_COLOR_INDEX and GL_BITMAP could work well... (but i haven't tried it)
[This message has been edited by miko (edited 04-01-2003).]
04-01-2003, 08:02 AM
Since most nice things you can do in OpenGL are in RGBA, not in color index mode, you should convert the monochrome to grayscale and then use luminance. That's how I do it, displaying large monochrome bitmaps split into textures.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.