[osg-users] how to render 16bit depth image
Bruno Oliveira
bruno.manata.oliveira at gmail.com
Mon Jul 18 11:13:54 PDT 2016
Hello,
I have a 16bit per channel, 4 channel, image. The format is short
(uint16_t). Note that this image is scaled to the full 16bit depth [0,
65536]
I have this code that works well for a 8bit, 4 channel image:
osg::ref_ptr<osg::Image> image = new osg::Image();
image->setImage(ImageSize, ImageSize,1,
GL_RGBA8,
GL_RGBA,
GL_UNSIGNED_INT_8_8_8_8_REV,
MyDataPtr,
osg::Image::NO_DELETE);
Now I want to por this to 16bit depth.
How is this done?
I tried
image->setImage(ImageSize, ImageSize,1,
GL_RGBA16UI,
GL_RGBA,
GL_UNSIGNED_INT_8_8_8_8_REV,
MyDataPtr,
osg::Image::NO_DELETE);
But this yields all black textures. How can I do this without converting my
16bit image pixel data?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160718/fb9f7672/attachment-0001.htm>
More information about the osg-users
mailing list