Hi, I’m still developing the PhantomSDL library =P, but I stil have
perfomance problems =S…
AFAIK, iterators are most quick and best way to iterate a list (I don’t get
very well with the STL…).
So, here is the code that gives me problems:
Instance Handler, Step Function:
std::list<PhantomSDL_CINSTANCE*>::iterator i;
for(i = mInstances.begin(); i != mInstances.end(); i++)
{
if( (*i) == NULL)
{
mLog->write(2,"[CInstanceHandler]-> NULL pointer avoided.");
continue;
}
(*i)->stepEvent();
if( (*i)->getVisible() ) (*i)->drawEvent();
}
Every stance that can be “instanced” in the Instance Handler, inherits from
PhantomSDL_CINSTANCE.
So then, the drawing event of each instance may vary, but when rendering
nothing, i do get no more than ~400 fps (focused window, 800x600x32).
This is when rendering with SDL.
When rendering with OpenGL…in the same circumstances, i get no more than
~80 fps (focused window, 800x600x32).
Can somebody tell me if this is a problem of my code, or whatever.
BTW, I have a GeForce FX 5500 256 videocard.
Thx!
Cya–
Phantom Lord
Caelis Studios —> Life’s just a game http://caelis-studio.com.ar
Caelis Studios Oficial Forums http://foro.caelis-studio.com.ar