function build()
    print("Scene Building!");
    rootNode = scene.getRoot();
	
	cubeBufferNode = object.new("sceneCubeBuffer", 128, 128, "RGBA" );
    rootNode:addChild( cubeBufferNode );
	
	mainSceneNode = object.new("sceneBuffer", window.getWidth(), window.getHeight(), 1, true, "RGBA16F", window.getFSAALevel() );
    rootNode:addChild( mainSceneNode );
	
	diamondNode = object.new("diamond", "res/models/Round_Diamond_03.exm", "res/shaders/Diamond.vert", "res/shaders/Diamond.frag" );
	diamondNode:setPosition( vector3.new( 0.0, 0.0, 0.0 ) );
	diamondNode:setScale( vector3.new( 100.0, 100.0, 100.0 ) );
	mainSceneNode:addChild(diamondNode);

	cameraNode = object.new("camera");
	mainSceneNode:addChild(cameraNode);
	scene.setActiveCamera(cameraNode);
	
    return true;
end

local lastTime = 0;

function update( time )
	diamondNode:setVisible( true );
	diamondNode:setRotation( vector3.new( time * 20.0, time * 45.0, 0.0 ) );
end

function render( time )
	rootNode:render( time );
	scene.postProcessBufferNode( mainSceneNode );
end
