Advertisement

Quick performance question

Started by April 24, 2002 08:56 PM
5 comments, last by Kiroke 22 years, 10 months ago
Hey guys! It''s been a long time since i posted here and worked on openGL(school) but i got into my old code and cleaned up a couple of things. I now come up with a little problem I remember I always had : when i start all my programs, there is a time where the computer wont time his objects properly. I do all my movements calculations with the time taken from the timer. There seems to be a lack of movement at the beginning and then the objects catch up rapidly and ends up where they are supposed to be. This seems like a sort of initialisation by openGL before it really render seriously without glitches. I just wondered if there is somthing u think of that could cause that init problem or if you cant do anything and must counter it with a load menu :-) Thx Kiroke Kiroke www.geocities.com/kiroke2
Kirokewww.geocities.com/kiroke2
If I understand correctly, just avoid updating your objects positions until everything is loaded. A load screen would just make everything look nicer.

E.
Advertisement
How can i know everything is loaded?? I mean, i do the initialisation and then render them, but i cant figure how ppl know when their objects are loaded. Is there a command or somthing?



Kiroke
www.geocities.com/kiroke2
Kirokewww.geocities.com/kiroke2
Most things which need to be loaded are probably in a file, so when the file loading stuff is done everything is loaded. After that switch from load screen to ingame stuff.
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
mmm ok thx

I dont use files yet (i make basic things still) so ill use that when ill be at that level.



Kiroke
www.geocities.com/kiroke2
Kirokewww.geocities.com/kiroke2
I know Serious Sam has an option to pretouch its memory before actually starting the level. I''m totally guessing here but I think the purpose to force those blocks in to higher priority system slots (I dunno all the fancy words =P).

I know exactly what you mean though. In 3DMark 2001 there is a scene change in the Nature demo where it does this exact thing. I''m thinking that while, yes the resources WERE loaded, they have been paged out or somehow placed in a lower priority slot.

Anyway, I guess what I''m trying to say is that before you set your game state in actual motion, run through and try to assist the system in precaching.

I realize I may be TOTALLY wrong on all this and if I am, please correct me! =]
Advertisement
quote:
Original post by Kiroke
I just wondered if there is somthing u think of that could cause that init problem or if you cant do anything and must counter it with a load menu :-)




I''m likely oversimplifying everything, but you could just simply post a glFinish(), which would pause execution until after everything is loaded and the current frame is displayed...

Of course even more basic, if you don''t want the initial frame displayed, then just don''t swap buffers until you are ready...

Hope that helps.

This topic is closed to new replies.

Advertisement