Jump to content
  • Advertisement
Sign in to follow this  
Thanhda

is DX backwords compatible?

This topic is 4954 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'm a total noob with api's, i just wanted to know if DX was backwords compatible. if i program my code in DX8, can it work in DX9? i was told that they got rid of directdraw and replaced it with direct3d. also is OGL backwords compatible?

Share this post


Link to post
Share on other sites
Advertisement
Yes, DX is backwards compatible. I think it only goes back as far as DirectX 4..but I could be wrong. Though I don't think code for DirectX 1 even exists anymore. (From what I heard of it, I hope it doesn't =)

My graphics engine is 2d and runs in DirectX 7 (cause it's all DirectDraw and DirectDraw doesn't exist after DX7). I use the DirectX9 SDK, but all the old code still works. You just gotta be consistent.

Good luck.

Share this post


Link to post
Share on other sites
really? i see i just created some code from this book i have that uses DX8, it compile fully. but when i try to use .net with DX9 SDK at my school, i get all these errors. this is just concernning. i'm currently trying to build a small basic engine that may posibly get bigger, i just dont want to have my code become obsolite, and not usable in future SDK's, or have to reprogram like 500 lines of code. my next question is OGL backwards compatible?

Share this post


Link to post
Share on other sites
This is an error that drove me away from game programming for a whole year, so I will try to steer you away from it if it is in fact what's happening to you.

Make sure that whatever IDE you're using has its include directories set properly. So long as it knows to include your DXSDK folders, your DirectX legacy code *will* compile.

That is, if your code is correct.

Share this post


Link to post
Share on other sites
well i'm currently inrolled at toronto's game design and development, and they have DX9 SDK installed, our class hasnt really touch DX yet, but i have. i got some nice books based on DX8, and by testing if it works, i compile the DX code from the books on my PC, it works fine with the DX8 SDK, but when i tried to compile it at my school, it doesnt. not sure why.

Share this post


Link to post
Share on other sites
Again, check that the include directories on your target system's IDE is set properly. I have only the DirectX 9 SDK, and I am constantly compiling DirectInput8 code and DirectDraw7 code. I promise it works.

If it compiles on your home system, the include directories for your *Project* on the school system are incorrectly set. When you load up on the school computer, check your personal session settings. If it is MSVS, or a derivative, it's under Tools..Options..Directories. Add DXSDK/INCLUDE to the include list...you'll also have to add the header directory in the same way.

Share this post


Link to post
Share on other sites
I'm not familiar with OpenGL, but am very familiar with DirectX. I HIGHLY recommend using Direct3D instead of DirectDraw. Whether to use 8 or 9 is not so important; use 9 if possible, but using 8 should be fine; it only took me a few days to update my fairly large D3D 8 game engine code to 9, anyway, albeit minor problems.

I had a terrible experience when I tried running my old DirectDraw engine on my new (at the time) WinXP machine over a year ago. I wrote it using DX 6.1, and WinXp comes with 8. Primarily, the graphics were drawn all screwed up, but it worked fine on my old Win 98SE PC. Even the good people of GameDev.net couldn't offer help. I gave up on DirectDraw and spent the next eight months converting to D3D 8 and taking a big sanity break. Innumerable problems almost led me to abandon my game project, though I did get through it ultimately.

In short: Use Direct3D over DirectDraw, unless you enjoy pain!

Best wishes. :)

Share this post


Link to post
Share on other sites
To be fair, I have to say DirectDraw is a *lot* simpler to understand than Direct3D. Having tried both I admit that I've put off another foray into 3d land until I get beefed up on my calculus. 2d's just fine for me, and DirectDraw surfaces - while they take some getting used to - really aren't that bad for the beginner.

Though there are admittedly few of us left who understand DirectDraw at all. =) I'll try to answer whatever questions you have about it when they come up. Andre Lamothe's book is good, as I said, and also all the documentation you could ever ask for (and more) can be found on MSDN.

Share this post


Link to post
Share on other sites
if the errors got something to do with unicode lpcwstrings etc then i strongly recommend taking the school's computer, drive to redmond and shove it up the *censored* ... well, i'm not really happy with the new dx9 as you can see... i tried to use it some time ago and used a small example i made before in dx8 and tried to change all 8s into 9s and i changed the project's properties to unicode. but it wouldn't compile. now i hate dx9 but i guess it's just something small i overlooked in my rage. as soon as i have time i'll see what i can do to get it running. if not i'll go back to ogl.
Quote:
Original post by BrianMJC
Whether to use 8 or 9 is not so important; use 9 if possible, but using 8 should be fine; it only took me a few days to update my fairly large D3D 8 game engine code to 9, anyway, albeit minor problems.
Best wishes. :)
i guess i did something wrong... i had big problems with the update :/
maybe i suck... yeah, that's the reason :|

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
People are becoming too touchy feely on this thread and is forgetting to answer the question... ahem...

So here is the low down.

DirectX inherits from COM (now replaced by NET) so that all your previous COMPILED DirectX programs SHOULD run on new versions of DirectX. That is the COM specification.

It is an entirely different thing when you are trying to compile legacy source code under the new DirectX SDKs even if you do specify that the headers and libs you want are that of previous versions. Been there, done that, it simply will not work or will not work very well.

If you are using DirectX8 however, the good news for you is that the API changed little and it should not be very difficult to port it over to the latest DirectX9 SDK.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!