PDA

View Full Version : about glDrawPixels Draw Bitmap



htrlq001
07-05-2012, 08:49 PM
Please Help Me

What not use glDrawPixels Draw Screen Bitmap Buffer Draw to Form,in 8-Bit and 16-Bit?
Current succeed Draw 24-bit and 32-Bit.

24:
glDrawPixels(Width,Height, GL_BGR, GL_UNSIGNED_BYTE, Data);
32:
glDrawPixels(Width,Height, GL_BGR_EXT, GL_UNSIGNED_BYTE, Data);

need 8-Bit and 16-Bit
(effect My is Chinese,not speake English,so language it is strange that)

Ilian Dinev
07-06-2012, 12:49 AM
glDrawPixels(Width,Height, GL_LUMINANCE, GL_UNSIGNED_BYTE, Data);

glDrawPixels(Width,Height, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, Data);


http://www.opengl.org/sdk/docs/man/xhtml/glDrawPixels.xml

htrlq001
07-06-2012, 04:33 AM
Tank You!

glDrawPixels(Width,Height, GL_LUMINANCE, GL_UNSIGNED_BYTE, Data);

as 8-Bit Draw is Color Error,but 16-Bit show message memory error?

glDrawPixels(Width,Height, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, Data);
"GL_UNSIGNED_SHORT_5_6_5" is 0x8363?
not show Bitmap.