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.
This commit is contained in:
Robert Osfield 2007-08-26 10:19:12 +00:00
parent 8a4db98e2b
commit 48f1291c7f

View File

@ -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;
}
}
}