<div dir="ltr"><div><div><div><div><div><div><div>Hello,<br><br></div>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]<br><br><br></div>I have this code that works well for a 8bit, 4 channel image:<br><br>osg::ref_ptr<osg::Image> image = new osg::Image(); <br> image->setImage(ImageSize, ImageSize,1,<br>GL_RGBA8,<br>GL_RGBA,<br>GL_UNSIGNED_INT_8_8_8_8_REV, <br></div>MyDataPtr,<br>osg::Image::NO_DELETE);<br><br><br><br></div>Now I want to por this to 16bit depth.<br></div>How is this done?<br><br></div>I tried<br><br> image->setImage(ImageSize, ImageSize,1,<br>GL_RGBA16UI,<br>GL_RGBA,<br>GL_UNSIGNED_INT_8_8_8_8_REV, <br>MyDataPtr,<br>osg::Image::NO_DELETE);<br><br></div>But this yields all black textures. How can I do this without converting my 16bit image pixel data?<br></div>