Jump to content
  • Advertisement


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



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

I wrote this nice little DirectDraw wrapper, where there's a class, CGraphics, which initialized DirectDraw and sets the video mode and has member that are the primary surface and the backbuffer, and functions that return the primary surface and the backbuffer. I also made a CSurface class where you give it an LPDIRECTDRAWSURFACE7 and then you can call functions on it, like Create and Load and Clear and stuff. Both of these classes appear to be working fine. There are no errors or anything. Ok, so I made a direct draw surface and passed it to CSurface class. I created the surface (100x100) and cleared it to white. Then I got the backbuffer from the CGraphics class and put it into a surface. I tried blitting my surface to it and page flipping in the main loop, and it didn't do anything. So after looking around for a really long time trying to find out what was wrong, I finally wrote this error log class. Whenever it tries blitting my surface to the backbuffer, it returns DDERR_INVALIDOBJEC, which means "DirectDraw received a pointer that was an invalid DirectDraw object." You don't pass a pointer to the DD object in the Blt() function, so I'm guessing that it gets it when I create it, which is kind of weird since you have to call the LPDIRECTDRAW7 function CreateSurface() in order to make the backbuffer, so it seems like it should work. I put my error log stuff all over the directdraw initialization place, and I don't get any errors when creating the DirectDraw object or the primary surface or backbuffer or anything. Why is it giving me this error when I blit? Anyone know how I might go about fixing it? - f l u c k y p o o - the geek inside [edited by - flucknugget on May 1, 2002 9:27:37 PM]

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!