Sign in to follow this  

SDL using DirectX

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

This topic is 4360 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this