- Update OsgGraph

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6132 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 6fb0556bd17085fbba14de08b94cd97c0d66201b
Former-commit-id: 2401ff7e9543e86f25edce37001a70041f498aa0
This commit is contained in:
torcs-ng 2015-09-17 18:07:15 +00:00
parent ee575d7ebd
commit a0ca56df07
2 changed files with 5 additions and 2 deletions

View file

@ -25,7 +25,7 @@
#include <osgViewer/GraphicsWindow>
namespace OSGUtil
namespace OSGUtil
{
class OsgGraphicsWindowSDL2 : public osgViewer::GraphicsWindow
{

View file

@ -75,7 +75,10 @@ void SDScreens::Init(int x,int y, int width, int height, osg::ref_ptr<osg::Node>
Camera->setPreDrawCallback(new CameraDrawnCallback);
#else
SDL_Window* GfuiWindow = GfScrGetMainWindow();
viewer->setThreadingModel(osgViewer::Viewer::CullThreadPerCameraDrawThreadPerContext);
//viewer->setThreadingModel(osgViewer::Viewer::CullThreadPerCameraDrawThreadPerContext);
//viewer->setThreadingModel(osgViewer::Viewer::CullDrawThreadPerContext);
//viewer->setThreadingModel(osgViewer::Viewer::DrawThreadPerContext);
viewer->setThreadingModel(osgViewer::Viewer::SingleThreaded);
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
SDL_GetWindowPosition(GfuiWindow, &traits->x, &traits->y);
SDL_GetWindowSize(GfuiWindow, &traits->width, &traits->height);