
what's the update frequency in cegui?
Moderators: CEGUI MVP, CEGUI Team
what's the update frequency in cegui?
better if anyone can talk about more information about this 

Re: what's the update frequency in cegui?
There is no constant frequency. It limited by your hardware (CPU, GPU, RAM speed, bus speed, algorithm optimization, etc). The CEGUI lib's overhead is very low, because CEGUI Team optimizes speed in each release.
The animation speed is implemented through injectTimePulse() function. I think you are curious why the delta is in float data type, not in integer milleseconds. Well because all animation is calculated in floats, so it better to store time in float.
It used for example for displaying tooltips after some time, fade in and fade out windows, wobbling effect, animation system.
The animation speed is implemented through injectTimePulse() function. I think you are curious why the delta is in float data type, not in integer milleseconds. Well because all animation is calculated in floats, so it better to store time in float.
It used for example for displaying tooltips after some time, fade in and fade out windows, wobbling effect, animation system.
helper to newbies
"i help you, dear newbie
but nobody helps me!"
"i help you, dear newbie
but nobody helps me!"
Re: what's the update frequency in cegui?
I don't know where to call the function "Window::update()"
Re: what's the update frequency in cegui?
spracle wrote:I don't know where to call the function "Window::update()"
As said here:
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.
You just call CEGUI::System::getSingleton().renderGUI() in main event loop and it draws all your GUI, for example:
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
}
helper to newbies
"i help you, dear newbie
but nobody helps me!"
"i help you, dear newbie
but nobody helps me!"
Who is online
Users browsing this forum: No registered users and 13 guests