Jump to content
  • Advertisement
Sign in to follow this  
EmilDenVige

Noobie DirectDraw question

This topic is 5022 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, i am a relatively new programmer, and i've just recently been tapping into DirectDraw and it's world of possibilities ;P I'm a total newbie when it comes to this stuff, so i read some toutorials and stuff, and then began to make my first app. I am using VB.NET in VS.NET and i managed to make some kind of enumeration and a simple fullscreen app with flashy lines bouncing around and stuff. DirectDraw is easy and will work very good for me. However, i have a small problem. My program, even though i have a tick test to limit the fps to around 32, takes up 100% cpu constantly. My main loop has only a call to a kind of showNextFrame function that won't execute if there hasn't been a set nuber of ticks since the last call, and a doEvents call. Any help would be appreciated, i probably just forgot something very crucial in my noobish attempt :) Thank you!

Share this post


Link to post
Share on other sites
Advertisement
I suspect you're always calling PeekMessage() in you main loop.

Try to put your PeekMessage() together with the showNextFrame() function.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!