Thanks.
Yes. I m using osg::Image to set my pixel buffer. I set GL_LUMINANCE as
internal pixel format. But I m getting only black image. My code looks like
this,
..
unsigned char* data;
int width, height;
width=4200; //source_image width
height=4710;//source_image height
long size = width * height;
data = new unsigned char[size];
//Reading Image of width * height into buffer
....
for(i=0;i<(width * height); i++)
data[i]=source_image[i]);
....
....
//Setting image
osg::ref_ptr<osg::Image> image = new osg::Image;
image->allocateImage(width, height, 1, GL_LUMINANCE, GL_UNSIGNED_BYTE);
image->setOrigin(osg::Image::BOTTOM_LEFT);
image->setImage(width, height, 1, GL_LUMINANCE, GL_LUMINANCE,
GL_UNSIGNED_BYTE,data, osg::Image::NO_DELETE);
texture->setImage(image);
....
My another question is, could it possible to display image without scaling
down/up?
Thanks
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=25509#25509
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org