Hi Alessandro, The Extension structure is a per graphics context structure that can only be initialized from the thread that has the associated graphics context current. Values such as the max texture size for each context as queried as stored in the extension structure on initialization of that structure, this typically happens when you call viewer.realize();
The DisplaySettings structure has a singleton which you typically will use to set global settings, but you can also assign a DisplaySettings object per per View as well in case you want different behaviour in a app with multiple views. Robert. On Mon, Jan 12, 2009 at 9:43 AM, alessandro terenzi <[email protected]> wrote: > With reference to my previous mail and as far as I understand, I need a > valid graphic context as 1st parameter of getExtensions(.). And I can get a > valid context only when a viewer is running, am I right? > > Since I ignored the fact that I needed a valid graphic context, I wrote a > node visitor to pre-process my scene graph in order to get extensions and > resizing every texture. The problem is that I 'accepted' the visitor before > actually having such a valid context...so during the graph traversal I call > getExtensions(0, true) and then setMaxTextureSize(.). > > As expected, I see that there is this error: > > Error: In Texture::Extensions::setupGLExtensions(..) OpenGL version test > failed, > requires valid graphics context. > > But it looks like that the texture resizing has been done successfully > although there was such an error. Why? Is it safe to do the resizing the way > I did? > > Thank you. Regards. > Alessandro > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

