Hi all,

I'm currently trying to convert a bitmap image file to an osg::Image.
I get my Bitmap from the win32 api making a screenshot, but as specified in the plugin bmp the internal format of the Bitmap is not RGB but BGR.

Is there any way to directly use the BGR data buffer in a new osg::Image or do I need to swap from BGR to RGB ?
I use this :
/    _texGrad->allocateImage(width, height, 1, GL_RGB, GL_UNSIGNED_BYTE);
_texGrad->setImage(width, height, 1, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, data, osg::Image::USE_NEW_DELETE); /

I tried to change the GL_RGB into GL_BGR without results...

Any suggestion will be very useful.

Thanks a lot.

Regards,
   Vincent.





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to