[osg-users] Using GLObjectsVisitor with a pre-DrawCallback
a.terenzi at gmail.com
Fri Mar 6 04:08:54 PST 2009
I'm trying to pre-load some models that need their texture to be rescaled.
Looking at earlier post I saw suggestions about using a
Camera pre-draw callback that uses the GLObjectsVisitor to compile
everything...but I can't find out exactly how to do this.
By now, here is what I did:
1) created a class derived from DrawCallback
2) before entering the rendering loop, I get a camera from the
viewer and set a preDrawCallback using the newly created class
But now what I'm missing is how to use GLObjectsVisitor, I guess that I must
use it inside the override for DrawCallback::operator()(osg::RenderInfo&
renderInfo) const; but how? As far as I understand from renderInfo I can get
the camera and, by doing so inside such a callback, I'm sure to get the
camera for the current context, but how do I apply the GLObjectsVisitor at
Thank you very much for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users