<div dir="ltr">Steve,<div>Just be aware that GL_LUMINANCE is long since deprecated and only available in compatibility context.</div><div>GL_RED is the only 1-channel option available in modern OpenGL.</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Glenn Waldron / osgEarth</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 5, 2019 at 12:49 PM Steve Hardy <<a href="mailto:osgforum@tevs.eu">osgforum@tevs.eu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Thanks for the responses. I tried Robert's initial suggestions, but they get <br>
<br>
Code:<br>
Warning: detected OpenGL error 'invalid value' at after RenderBin::draw(..)<br>
<br>
<br>
on my system.<br>
<br>
Glenn's suggestion basically worked, although the image was literally shades of red. So I looked at the DefaultFont source, and tried GL_ALPHA. Maybe that would have worked if I turned alpha blending on etc. So just for kicks I tried GL_LUMINANCE (for internal and pixel format) and it worked!<br>
<br>
So, for the record, here is what worked best for me:<br>
<br>
<br>
Code:<br>
img->setImage(w, h, 1, GL_LUMINANCE, GL_LUMINANCE, GL_UNSIGNED_BYTE, data, osg::Image::USE_MALLOC_FREE); // works!<br>
<br>
<br>
<br>
<br>
<br>
Thank you!<br>
<br>
Cheers,<br>
Steve<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=76880#76880" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=76880#76880</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">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>
</blockquote></div>