From f16167c3e87345df73c0b3bcb43e44149d3dbae6 Mon Sep 17 00:00:00 2001 From: jamie robertson Date: Fri, 7 Apr 2017 07:15:30 +0100 Subject: [PATCH] osgbindlesstext example fix : needed to add "viewer.realize()" before the line "viewer.getCamera()->getGraphicsContext()" in order to get a valid graphics context, before viewer.run() is called. --- examples/osgbindlesstext/osgbindlesstext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/osgbindlesstext/osgbindlesstext.cpp b/examples/osgbindlesstext/osgbindlesstext.cpp index 4e95cc1fa..c431f3ae0 100644 --- a/examples/osgbindlesstext/osgbindlesstext.cpp +++ b/examples/osgbindlesstext/osgbindlesstext.cpp @@ -589,6 +589,8 @@ int main(int argc, char** argv) // add model to viewer. viewer.setSceneData( CreateScene() ); + + viewer.realize(); viewer.getCamera()->getGraphicsContext()->getState()->setUseModelViewAndProjectionUniforms(true);