<div dir="ltr"><div><div>Sorry but I didn't quite catch that.<br></div>What do you mean by "but I thing you need to use GL_RGBA_INTEGER_EXT
as source"<br></div>Alternatively, how can I replace the macros in that setImage function call?<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-07-19 8:45 GMT+01:00 Sebastian Messerschmidt <span dir="ltr"><<a href="mailto:sebastian.messerschmidt@gmx.de" target="_blank">sebastian.messerschmidt@gmx.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi,<br>
<br>
Your internal format needs to be 16bit per channel to I think, so
GL_UNSIGNED_INT_8_8_8_8_REV might be inappropriate. <br>
GL_R16UI might do, but I thing you need to use GL_RGBA_INTEGER_EXT
as source. Alternatively you can use GL_LUMINANCE with
GL_LUMINACE16F.<br>
<br>
What exactly are you doing with the image? <br>
<br>
Cheers<br>
Sebastian<br>
</div>
<blockquote type="cite"><div><div class="h5">
<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>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
osg-users mailing list
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
</blockquote>
<p><br>
</p>
</div>
<br>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br></blockquote></div><br></div>