graphics engine question

Started by
4 comments, last by ProgrammingNerd 18 years, 9 months ago
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?
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.


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).
I do real things with imaginary numbers
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?
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)


Thanks for all your help! I guess that being I haven't written a "full scale" engine, there are more important concept to figure out.

This topic is closed to new replies.

Advertisement