what's the update frequency in cegui?
Posted: Wed Dec 22, 2010 08:37
better if anyone can talk about more information about this 

The official forum for CEGUI
http://cegui.org.uk/forum/
spracle wrote:I don't know where to call the function "Window::update()"
virtual void CEGUI::Window::update ( float elapsed ) [virtual]
Cause window to update itself and any attached children. Client code does not need to call this method; to ensure full, and proper updates, call the injectTimePulse methodname method provided by the System class.
Code: Select all
// Main loop
int runningFlag = GL_TRUE;
double lastTime = glfwGetTime();
while( runningFlag == GL_TRUE )
{
glClear( GL_COLOR_BUFFER_BIT ); // Clear the window with the defined clear color
CEGUI::System::getSingleton().injectTimePulse( glfwGetTime() - lastTime );
lastTime = glfwGetTime();
drawScene();
CEGUI::System::getSingleton().renderGUI();
glfwSwapBuffers();
runningFlag = !glfwGetKey( GLFW_KEY_ESC ) && glfwGetWindowParam( GLFW_OPENED ); // ESC key or Window Closed test
}