Skip to content

Commit

Permalink
Fixed the position of the viewport for the camera
Browse files Browse the repository at this point in the history
The position of viewport doesn't setup properly, some part of viewer is out of CMFC_OSG_MDIView,  and not visible.
  • Loading branch information
mijiping committed Jun 18, 2018
1 parent 3410d3a commit 36aa3a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/osgviewerMFC/MFC_OSG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void cOSG::InitCameraConfig(void)
camera->setGraphicsContext(gc);

// Set the viewport for the Camera
camera->setViewport(new osg::Viewport(traits->x, traits->y, traits->width, traits->height));
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);
Expand Down

0 comments on commit 36aa3a4

Please sign in to comment.