Added dynamic_cast<GraphicsWindow> and extra doc commented just to force the

use of symbol from osgViewer so that it links properly and pulls in the platform
specific GraphcisWindow* implementation.
remotes/origin/OpenSceneGraph-2.6
Robert Osfield 17 years ago
parent 8a4db98e2b
commit 48f1291c7f

@ -20,6 +20,8 @@
#include <osgUtil/Optimizer>
#include <osgUtil/SmoothingVisitor>
#include <osgViewer/GraphicsWindow>
#include <iostream>
#include "OrientationConverter.h"
@ -54,7 +56,14 @@ class MyGraphicsContext {
{
_gc->realize();
_gc->makeCurrent();
std::cout<<"Realized context"<<std::endl;
if (dynamic_cast<osgViewer::GraphicsWindow*>(_gc.get()))
{
std::cout<<"Realized graphics window for OpenGL operations."<<std::endl;
}
else
{
std::cout<<"Realized pbuffer for OpenGL operations."<<std::endl;
}
}
}

Loading…
Cancel
Save