Hi Dominc,

The best way to do a single GL test at startup is to attach a custom
osg::GraphicsOperation as a RealizeOperation to the viewer, and this
gets called once the viewer's graphics contexts get realized.

Have a look at the osgcatch, osgshaderterrrain and osgvolume examples
to see examples of the above in action.

Robert.

On Fri, Jan 8, 2010 at 8:50 PM, Dominic Stalder
<dominic.stal...@bluewin.ch> wrote:
> Hi there
>
> I would like to read the OpenGL extensions with isGLExtensionSupported(),
> but for this I need a draw context. I registred a DrawCallback Class, see
> below. I need to call the operator() method only once, but because this
> method is const, I cannot write to the member variable bool first. How can I
> resolve this problem?
>
>        class GameViewOSGDrawCallback : public osg::Camera::DrawCallback
>        {
>        private:
>            GameViewOSG *parent;
>            bool first;
>
>        public:
>            GameViewOSGDrawCallback(GameViewOSG* parent=0);
>
>            virtual void operator()(const osg::Camera&) const;
>        };
>
> Thanks a lot
> Dominic
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to