[osg-users] Is it possible to load texture without applying to a drawable

Steve Powers stevenapowers at gmail.com
Thu May 9 08:33:47 PDT 2019


I am attempting to load a Texture2D into memory in order to pass the
texture ID to a 3rd party OpenGL object that will use the ID within it's
own drawable class.

The issue is that the TextureObject attached to the texture is not getting
instantiated and I think this is because it is not assigned to a drawable
object and thus not getting visited.


Instead, I set the texture to a stateset on an osg::Group node


stateset = group->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON);


Is there a way to have this texture object instantiate without physically
using the texture on a drawable?

Thank you!

Cheers,
Steven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190509/fe109485/attachment.html>


More information about the osg-users mailing list