Hi Philipp On 30 August 2016 at 13:20, Philipp Meyer <philipp.me...@fh-bielefeld.de> wrote: > How do I provide a graphics context for a viewer? I see there is a method > returning all graphics contexts, but I cant find any methods to set the > context, and the constructor of osgViewer doesnt take a graphics context > either.
You assign the GraphicsContext to the viewer Camera(s). The osgViewer:realize() method will create and assign a GraphicsContext if one is not already assigned, this exists just as a fallback, ideally the viewer and associated Camera(s) should be set up prior to the realize() call. An example of manually creating and assigning GraphicsContext/Window can be found in the osgwindows examples. > Maybe there is an easier way to accomplish what I need? I want to store a > timestamp BEFORE the call to swapBuffers, but after rendering traversal. You are creating a custom GraphicsContext just to get a timestamp? When you say before swap buffers, do you mean just before the call to swap buffers or do you mean any time in the frame before swap buffers. What do you need to the timestamp for? Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org