Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/osgqfont/osgqfont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,10 @@ class MainWindow : public QWidget {
camera->setGraphicsContext(graphicsWindow);
camera->setViewport(new osg::Viewport(0, 0, width(), height()));

// set the draw and read buffers up for a double buffered window with rendering going to back buffer
camera->setDrawBuffer(GL_BACK);
camera->setReadBuffer(GL_BACK);

startTimer(10);
}

Expand Down
5 changes: 5 additions & 0 deletions examples/osgviewerQt/osgviewerQt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ class ViewerWidget : public QWidget, public osgViewer::CompositeViewer

camera->setClearColor( osg::Vec4(0.2, 0.2, 0.6, 1.0) );
camera->setViewport( new osg::Viewport(0, 0, traits->width, traits->height) );

// set the draw and read buffers up for a double buffered window with rendering going to back buffer
camera->setDrawBuffer(GL_BACK);
camera->setReadBuffer(GL_BACK);

camera->setProjectionMatrixAsPerspective(30.0f, static_cast<double>(traits->width)/static_cast<double>(traits->height), 1.0f, 10000.0f );

view->setSceneData( scene );
Expand Down