RSS

Tag Archives: png

Open Scene Graph: Render scene to image


OSG ships with many examples including several applications that renders the scene to image, for instance OsgAutoCapture, and OsgScreenCapture.

Whilst these applications are information rich, yet they lack sufficient conciseness and are not right to the point sometimes. It took me hours to get what I need, and for my specific task, I just need such a simple class OsgSnapshotHelper:

void Capture(osgViewer::Viewer* pViewer, std::string outputImagePath)
{
OsgSnapshotHelper* osh = new OsgSnapshotHelper(pViewer);
osh>Capture(outputImagePath);
delete osh;
osh = NULL;
std::cout << Ending Capture: << outputImagePath  << std::endl;
}

image

And here is my implementation, based on OsgAutoCapture example. I wrapped it to what I need and removed all unnecessary stuff into one single class, which would be very portable then.

image

Read the rest of this entry »

Advertisements
 
5 Comments

Posted by on June 30, 2014 in osg, Programming

 

Tags: , , , , , , ,

Building OpenSceneGraph with Visual Studio 2013


Visual Studio 2013 has been out for a few months, and OpenSceneGraph also has their latest release up to version 3.3.1. It is now possible to build OpenScenegraph, inclusive of most widely used plugins, all with Visual Studio 2013.

  • Extract the dependency packages to “C:\Osg331\3rdParty”, use contents in either the x86 or x64 folder, but not both.
    image

Read the rest of this entry »

 
13 Comments

Posted by on February 25, 2014 in osg, Programming

 

Tags: , , , , , , ,