<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>Ok so I meant GL_ vars. Could you suggest any code for substituting that setImage line? Thank you</div><div><br>On 19 Jul 2016, at 09:35, Sebastian Messerschmidt <<a href="mailto:sebastian.messerschmidt@gmx.de">sebastian.messerschmidt@gmx.de</a>> wrote:<br><br></div><blockquote type="cite"><div>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
<div class="moz-cite-prefix">Hi Bruno,<br>
</div>
<blockquote cite="mid:CAO-SbSv4wHeXn0VbmtG_+oZtRTvRE0YejNYY07NJ0=nVpsWRDw@mail.gmail.com" type="cite">
<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>
</div>
</blockquote>
The source type needs to be GL_RGBA_INTEGER_EXT afaik when using
integer textures. <br>
<blockquote cite="mid:CAO-SbSv4wHeXn0VbmtG_+oZtRTvRE0YejNYY07NJ0=nVpsWRDw@mail.gmail.com" type="cite">
<div dir="ltr">Alternatively, how can I replace the macros in that
setImage function call?<br>
</div>
</blockquote>
Which macros? The GL_ are constants. <br>
<br>
Cheers<br>
Sebastian <br>
<blockquote cite="mid:CAO-SbSv4wHeXn0VbmtG_+oZtRTvRE0YejNYY07NJ0=nVpsWRDw@mail.gmail.com" type="cite">
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-07-19 8:45 GMT+01:00 Sebastian
Messerschmidt <span dir="ltr"><<a moz-do-not-send="true" 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 moz-do-not-send="true" href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a>
<a moz-do-not-send="true" 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 moz-do-not-send="true" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a moz-do-not-send="true" 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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
</blockquote>
<p><br>
</p>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>osg-users mailing list</span><br><span><a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a></span><br><span><a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a></span><br></div></blockquote></body></html>