View Full Version : Slow down an array?
03-01-2006, 06:24 AM
Hi, Is there any way I can loop through the elements of an array a bit slower? I am currently using an array to hold the filenames of images I want to load. When the user presses a key, the images animate by looping through the filenames in the array, and displaying the images.
If anyone know any methods, they would be appreciated. Thanks :)
P.S. Any idea why my post got locked on the advanced coding section called "Class problem". I thought it was pretty much related to opengl. nm though
03-01-2006, 11:20 AM
why not using a timer ... ?
its a common programming thing if you dont know this well . go to class again
03-01-2006, 12:50 PM
well, the post started with "c++", so you implied that it <might> not be an opengl problem. and you posted random snippets like "here's the constructor" or "here's the destructor" which doesn't really help, because in c++ a constructor is called when an object is created, and a destructor is called when an object is deleted. for debugging c++ it is necessary to know the complete history of an object. is it a global or local variable?
if something does not work, save us some work and post the shortest compileable code that suffers from the problem that you described. something that i can copy+paste from here and try to compile.
03-01-2006, 02:56 PM
yeh well, not everyone knows everything. I tried using the Sleep() function, but I have a feeling its not terribly efficient.
Thanks for clearing that up RB. I think it would be a good idea to have a rules section to avoid this sorta thing. Cheers
This may sound a bit harsh, but common sense should be enough to know how to ask questions.
But if you really need a "rules section", check this out:
03-02-2006, 06:48 AM
yes it is a bit harsh thanks
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.