HI Peterakos, I don't use Windows so can't answer specifically on MS issues, but in general the OpenGL related GetProcAddress functions require a context to be valid for them to work, so perhaps the initialization order of your application has the external widget set being called before a valid context has been created for that thread.
The OSG can create rendering threads in the background so it's quite normal for the main thread never to have a graphics context current, so any OpenGL calls in the main will fail, perhaps you code is doing this. The OSG has osgViewer library has RealizeOperation that you can use to initialize OpenGL code once a graphics context has been created. The OSG examples that use a RealizeOperation are: ~/OpenSceneGraph/examples$ grep RealizeOperation */* osgcatch/osgcatch.cpp: viewer.setRealizeOperation(new CompileStateCallback(seh)); osgshaderterrain/osgshaderterrain.cpp: viewer.setRealizeOperation(testSupportOperation.get()); osgvolume/osgvolume.cpp: viewer.setRealizeOperation(testSupportOperation.get()); Robert. On 17 September 2012 18:01, Peterakos <ppapa...@csd.uoc.gr> wrote: > Hello. > > I am trying to use an external widget library in osg. > This library tries to load the opengl functions during initialization using > wglGetProcAddress. > > This procedure works in opengl but not in open scene graph. It fails for > functions in gl 1.2 and later. > I found this: The Microsoft Windows DLL opengl32.dll only directly exposes > OpenGL 1.1 functions. To gain access to functions from higher GL versions, > you must load these function pointers manually with wglGetProcAddress. > > So the library cant load the functions using wglGetProcAddress. > > Is there any reason for that happening ? > > > Thank you for your time. > > _______________________________________________ > 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