View Full Version : Problem in drawing a 16bits image monochrome( black and white)
02-20-2003, 11:34 AM
can u tell me plz how to draw a 16bits image ( image monochrome(black and white) )
using "glDrawPixels";Assuming that we have a
buffer of that image as follow :
what must be each parameter of "glDrawPixesls"
thanks for help
02-20-2003, 11:49 AM
glDrawPixels(256 /*Width*/, 256 /*Height*/, GL_LUMINANCE /*Image format*/, GL_SHORT /*Data type*/, buffer /*Image pointer*/);
Hope that helps.
As a reference: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/glfunc01_6lbn .asp (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/glfunc01_6lbn.asp)
Now that I think about it, you might have to make buffer a pointer first by adding an '&' before buffer... I'm not sure (I don't use glDrawPixels a whole lot).
[This message has been edited by NitroGL (edited 02-20-2003).]
Just out of curiosity:
Why are you wasting 16 bits per pixel on a monochrome black and white image?
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.