Skip to content

Instantly share code, notes, and snippets.

@fajran fajran/cube.cpp
Created Jan 30, 2009

Embed
What would you like to do?
#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
You can’t perform that action at this time.