Jump to content
  • Advertisement
Sign in to follow this  
GameMasterXL

SDL using DirectX

This topic is 4576 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 never knew SDL.dll used directX for its input ect, is this true? since when i searched through the sdl.dll i found directX functions there for drawing and getting input, how does this make it portable?

Share this post


Link to post
Share on other sites
Advertisement
The windows version of SDL uses DirectX. Other platforms implement SDL in different ways (I'm assuming that most use OpenGl and various imput and sound libraries).

Code you write using SDL for one platform will work on another platform because the SDL functions have the same declarations, they are simply implemented differently.

Share this post


Link to post
Share on other sites
Only the win32 implementation of SDL uses DirectDraw (which is, essentially a deprecated part of DirectX). To "port" it you have to compile it on another system with that system's SDL implementation.

"Portability" doesn't imply you can use the same executable across systems, it just means you have to make little-to-no changes to your code. SDL provides a constant system-independant interface so you don't have to worry about the implementation.

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.

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!