function build()
    print("Scene Building!");
    rootNode = scene.getRoot();
	
	cubeBufferNode = object.new("sceneCubeBuffer", 512, 512, "RGBA" );
    rootNode:addChild( cubeBufferNode );
	
	mainSceneNode = object.new("sceneBuffer", window.getWidth(), window.getHeight(), 1, true, "RGBA16F", window.getFSAALevel() );
	rootNode:addChild( mainSceneNode );
    
	
	--[[
    cubeSkydomeNode = object.new("skydome", 128, 256, 2500.0);
    cubeSkydomeNode:setPosition( vector3.new( 0.0, 0.0, 0.0 ) );
    --skydomeNode:setScale( vector3.new( 10000.0, 10000.0, 10000.0 ) );
    --mainSceneNode:addChild(skydomeNode);
	cubeBufferNode:addChild(cubeSkydomeNode);
	--]]
	
	
	cubemapDebugNode = object.new("cubemapDebug");
	cubeBufferNode:addChild(cubemapDebugNode);
	
sphereNode = object.new("sphere", 128, 128, 100.0);
    sphereNode:setPosition( vector3.new( 0.0, 0.0, 0.0 ) );
    mainSceneNode:addChild(sphereNode);
    
    skyboxNode = object.new("skybox", "res/textures/SkyboxTex.jpg");
    mainSceneNode:addChild(skyboxNode);
	
	
    return true;
end

local lastTime = 0;

function update( time )
end

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