Jump to content
Posted 31 December 2011 - 03:52 PM
Posted 31 December 2011 - 04:50 PM
Posted 31 December 2011 - 04:54 PM
Posted 31 December 2011 - 06:13 PM
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.
Posted 31 December 2011 - 06:18 PM
hello all, i have a design decision to make in my game, which is becoming hard to overcome.
i'm writing a game utilizing openGL, on windows, and basically, i find my program having irratic framerate because i call sleep at the end of each game loop, so that i don't utilize the entire cpu.
if i don't call sleep, my framerate skyrockets(with vsync off), but when i do call sleep, it wreaks havoc on my framerate(sometimes dipping down to 20-30 fps, or popping up to 100fps), i currently utilize a timer to lock my game to a maximum of 60 fps. my gpu can easily handle what i'm pushing down it, since without sleep, i can maintain fps's in the thousands.
i could use a variable step approach to fix the irratic fps issue, but i was hoping to find an alternative solution to my problem.
the only reason i can foresee sleep being a problem is because it's not guaranteed to sleep for the amount of time i request.
is their an alternative to sleep that doesn't cause the cpu to be used constantly, or should i simply not care that i'm utilizing 100% of the resources?
Posted 31 December 2011 - 09:23 PM
“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”
Posted 01 January 2012 - 01:08 AM
Posted 01 January 2012 - 07:16 AM