Jump to content
  • Advertisement

Archived

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

Alex5

DX7 Question

This topic is 6262 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 am using DX 7 to make a 2D game. I am using D3D for some special effects. I was wondering if I should make a special class as a ddraw and d3d "wrapper", that way I could have a simple function call for my special effects, such as alpha blending, and it would all be centralized in one class. The reason I ask this is because I was wondering if having a seperate class for ddraw and d3d would slow down normal blt''ing. I could access ddraw in one of two ways:
  
hRet = ddwrapper.dd->blt(...);
if (hRet != DD_OK)
{
...
}
  
or I could put this as a function in the class. Even if I made the function inline, do you think this would slow the program down too much? Please reply! Thanks!

Share this post


Link to post
Share on other sites
Advertisement
I''ve done it both ways. Not much difference in speed either way, since the blt itself takes the majority of the time (at least the setup for it does).
That being said, an extra function call always (unless it''s inlined) takes up a little extra time, just not very much unless you call it a billion times (:

I found it was kind of nice to have everything in one place, but at the same time having all those "DXWrapper->" strings can add up and hurt code readability somewhat.



-ns-

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!