<div dir="ltr"><div>Sorry Glenn what do you mean by "those reserved"?<br><br><br></div>By the way, my intention is to pass uchar textures of fixed size, to perform texelFetch and bitwise operations inside a shader, so I really need my textures to be in the exact format of unsigned byte integer, single channel!<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-10-21 12:25 GMT+01:00 Glenn Waldron <span dir="ltr"><<a href="mailto:gwaldron@gmail.com" target="_blank">gwaldron@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Bruno, I think you have those reversed. </p><div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><div class="gmail_quote">On Oct 21, 2016 6:07 AM, "Bruno Oliveira" <<a href="mailto:bruno.manata.oliveira@gmail.com" target="_blank">bruno.manata.oliveira@gmail.<wbr>com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello,<br><br></div>thank you for your answer. I am indeed using the same texture sizes and formats.<br></div>If I use GL_LUMINANCE8 as pixelFormat and GL_LUMINANCE as internalFormat, I get a "invalid enumerant" error<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-10-21 7:56 GMT+01:00 Sebastian Messerschmidt <span dir="ltr"><<a href="mailto:sebastian.messerschmidt@gmx.de" target="_blank">sebastian.messerschmidt@gmx.d<wbr>e</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Bruno:<br>
Sorry for not reading to the end:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
Hello,<br>
<br>
I'm trying to create a Texture2DArray. My textures are uchar images with<br>
size (texWidth, 256), single channel. The combination of texture<br>
internalFormat and pixelFormat with pixelType is not working. I use<br>
GL_R8UI for internalFormat, GL_RED_INTEGER for pixelFormat and<br>
GL_UNSIGNED_BYTE for type. This yields the following error when I try to<br>
render my scene:<br>
<br></span>
/Warning: detected OpenGL error 'invalid enumerant' at after<br>
RenderBin::draw(..)/<span><br>
<br>
However, if I use GL_LUMINANCE for internalFormat and also GL_LUMINANCE<br>
for pixelFormat, I get no errors but my textures are not correctly<br>
sized. WHat formats should I use here?<br>
</span></blockquote>
When using GL_LUMINCANE as internal formet the pixlel format needs to be GL_LUMINANCE4/8/12/16[F/I/UI] ...<br>
<br>
So basically for default precision (GL_BYTE) it should be<br>
<br>
GL_LUMINANCE8<br>
<br>
<br>
Cheers<br>
Sebastian<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
<br>
This is my code:<br>
<br>
<br>
<br>
osg::ref_ptr<osg::Texture2DArr<wbr>ay> texture = new osg::Texture2DArray;<br>
texture->setFilter(osg::Textur<wbr>e2DArray::MIN_FILTER,<br>
osg::Texture2DArray::LINEAR);<br>
texture->setFilter(osg::Textur<wbr>e2DArray::MAG_FILTER,<br>
osg::Texture2DArray::LINEAR);<br>
texture->setWrap(osg::Texture2<wbr>DArray::WRAP_R, osg::Texture2DArray::REPEAT);<br></span>
texture->setInternalFormat(*t<wbr>extureFormat()*);<span><br>
<br>
<br>
// Add some images as follows:<br>
for (...) {<br>
<br>
osg::Image* image = new osg::Image;<br></span>
image->setImage(texWidth, 256, 1, *textureFormat(), pixelFormat(),<br>
type(),* dataPtr);<span><br>
<br>
texture->setImage(i, image);<br>
}<br>
<br>
<br>
I am using:<br>
textureFormat() = GL_R8UI;<br>
pixelFormat() = GL_RED_INTEGER;<br>
type() = GL_UNSIGNED_BYTE<br>
<br>
<br></span><span>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
<br>
</span></blockquote><div class="m_7508500965698705903m_608825244363782695HOEnZb"><div class="m_7508500965698705903m_608825244363782695h5">
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
</div></div></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
<br></blockquote></div></div>
</div></div><br>______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
<br></blockquote></div><br></div>