View Full Version : Loading Textures by glTexImage2D

Mad Max
02-17-2000, 04:45 AM
Hi, ALL!

Anyone now that glTexImage2D support different input and output data types, even GL_BGR_EXT and GL_BGRA_EXT for windows bitmap. But, does anyone know how use input data stored in 16 bits per pixel (555 or 565) without manually converting into supported type.


02-17-2000, 05:25 AM
Yes, you do it this way: check for the extension EXT_packed_pixel.
If it's found use an internal_format of GL_RGB5_A1, or GL_RGBA4. Look the specs for more info/formats.
Note that drivers without that ext, won't work with the mentioned formats.

Mad Max
02-17-2000, 05:44 AM
Thanks, paolom!

[This message has been edited by Mad Max (edited 02-17-2000).]