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:
parent
8a4db98e2b
commit
48f1291c7f
@ -20,6 +20,8 @@
|
|||||||
#include <osgUtil/Optimizer>
|
#include <osgUtil/Optimizer>
|
||||||
#include <osgUtil/SmoothingVisitor>
|
#include <osgUtil/SmoothingVisitor>
|
||||||
|
|
||||||
|
#include <osgViewer/GraphicsWindow>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "OrientationConverter.h"
|
#include "OrientationConverter.h"
|
||||||
@ -54,7 +56,14 @@ class MyGraphicsContext {
|
|||||||
{
|
{
|
||||||
_gc->realize();
|
_gc->realize();
|
||||||
_gc->makeCurrent();
|
_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…
Reference in New Issue
Block a user