Horde3D::render takes ~5 seconds to render an empty scene graph with one fullscreen overlay...
I'm using a fairly large, ~1 meg png, i also tried bitmap but the same thing still happend...
Could the render be parsing the overlay image every frame?
heres the code:
Code:
//NOTE: Horde3D has been initialised previously
void CApp::start() //runs title screen
{
//load gui
ResHandle pipeRes = Horde3D::addResource( ResourceTypes::Pipeline, "pipelines/gui.pipeline.xml", 0 ); //pipeline
ResHandle background = Horde3D::addResource( ResourceTypes::Material, "gui/background.material.xml", 0 ); //background
Horde3DUtils::loadResourcesFromDisk("Media/");
NodeHandle cam = Horde3D::addCameraNode( RootNode, "Camera", pipeRes );
int refresh = 0; //so we dont update the gui every frame
while ( !exit )
{
//check for events
SDL_PollEvent(&event);
if (event.type == SDL_QUIT) exit = true;
if ( refresh == 0 ) //if its time to refresh
{
//update buttons TODO
//clear
Horde3D::clearOverlays();
//draw
//top left //bottom left //bottome right //top right
Horde3D::showOverlay( 0.0f, 0.0f, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, background, 0 );
//render
Horde3D::render( cam );
Horde3D::finalizeFrame();
refresh = 100; //refresh every 20 frames
}
else refresh--; //reduse refresh
SDL_GL_SwapBuffers(); //swap gl buffers
//write h3d log
Horde3DUtils::dumpMessages();
}
return;
}
P.S
overlays do get drawn during Horde3D::render right?