Jump to content
  • Advertisement
Sign in to follow this  
ProgrammingNerd

graphics engine question

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

Is it a good idea to separate directx api from the rest of my code in my graphics engine? Just in case I want to be able to easily port this to a different graphics api or to upgrade it to the latest version of directx? Is this too much hassle to bother with?

Share this post


Link to post
Share on other sites
Advertisement
API independent then you will very much need to abstract it all a little.
Supporting the latest version of DirectX... I don't see the problem, if you want to upgrade, simply upgrade? The DirectX API stays the same and will most likely only have additions to it's API, so this shouldn't be a concern at all.

EDIT: I would say though, unless you are making a full scale engine or having thoughts about it, really don't bother, if you haven't done an engine before, you've got much more important things to deal with than being API independent.

Share this post


Link to post
Share on other sites
I would say just go ahead and use the DirectX API. If you're worried about porting it over to the XBox or XBox360, the API is quite similar. OpenGL/Linux on the otherhand might be useful to segregate the API calls.

And as far as I would suggest, you don't have to worry about upgrading DirectX. I read somewhere that DirectX 9c is the last major version of DirectX that's going to come out before WGF comes out (Windows Graphics Foundation).

Share this post


Link to post
Share on other sites
The reason i wonder about the directx api changing is from experience. I was writing a custom x-file parser and finished it in directx 9.0B. But when wanted to port it to 9.0C, Microsoft screwed around with the IDirectXFile interface, deprecated it, and replaced it with ID3DXFile. And the interface was all screwed up.

I think that every version of directx's file are shipped with the latest sdk ie I can still use directx 7 with the directx 9 sdk.

PS What is a good book on making an api inspecific engine?

Share this post


Link to post
Share on other sites
Quote:
Original post by ProgrammingNerd
The reason i wonder about the directx api changing is from experience. I was writing a custom x-file parser and finished it in directx 9.0B. But when wanted to port it to 9.0C, Microsoft screwed around with the IDirectXFile interface, deprecated it, and replaced it with ID3DXFile. And the interface was all screwed up.

I think that every version of directx's file are shipped with the latest sdk ie I can still use directx 7 with the directx 9 sdk.

PS What is a good book on making an api inspecific engine?


(Sorry, the book was meant for another thread, was mistaken on your name)

Still, very small things happen and if they do happen, the previous behaviour is likely to be reproducible, and either way, I would encourage you to not bother about it too much. (What's the worse that could happen? Ending up editing a few lines in your game)

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!