Skip to content

Instantly share code, notes, and snippets.

@fajran
Created January 30, 2009 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fajran/55138 to your computer and use it in GitHub Desktop.
Save fajran/55138 to your computer and use it in GitHub Desktop.
#include <osg/Matrix>
#include <osgViewer/Viewer>
#include <osg/Geode>
#include <osg/Shape>
#include <osg/ShapeDrawable>
#include <osg/Vec3>
using namespace osg;
using namespace osgViewer;
int main() {
Geode* geode = new Geode();
geode->addDrawable(new ShapeDrawable(new Box(Vec3(0.0f, 0.0f, 0.0f), 50.0f)));
Viewer viewer;
viewer.setUpViewInWindow(50, 50, 800, 600);
viewer.setSceneData(geode);
viewer.run();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment