Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Odd problem DX6.1

This topic is 6053 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

This problem has been annoying me for over a week now, but I''ve discovered where I should start looking after some error tests. My application is supposed to load a bitmap, blit it to the back buffer, and flip the page. Just a simple task. But for some reason, it will not blit because the surface that holds the bitmap is assigned to NULL before GameMain() is called. The surface is fine up to the point where GameInitialize() ends. A (crummy) visual: GameInitialize() { Surface is just fine. } (Process Windows messages and enter main message loop) GameMain() { Surface is NULL. } I have looked over my code and compared it to the code on a CD thousands of times. The CD code works fine, and I''ve tested all my functions in it. All my surfaces are global, the bitmap is not. I''ve tried making the bitmap global, along with a surface description, but nothing changes. I was going to put up some code, but I wanted to see if anyone has any ideas first. But if you''d like me to mail the source code, I''ll try that as well.

Share this post

Link to post
Share on other sites
Okay. Most of the code is based on Tricks of the Windows Game Programming Gurus.
I didn''t comment much, but all the functions should be self explanatory. I''ve tested them out too in another program, and they work fine.

Thank you so much for taking the time to help.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!