• Advertisement

Archived

This topic is now archived and is closed to further replies.

Probably sounds n00bish but...

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

Do you only use SDL for graphics and DirectX for input etc.? Thanks for all your help in advance, Tom ______________________________ "Isn''''t it strange that that pig only had one nipple..." - Richard Richard, An Arse Oddity.

Share this post


Link to post
Share on other sites
Advertisement
As far as I know, SDL can be used for all sorts of things. I think if I were to use it for graphics, I''d probably go the whole hog and use it for input as well. Just to make the code simpler.

Share this post


Link to post
Share on other sites
You should see SDL as a wrapper for different API''s for different platforms. If you write a "pure" SDL application you can request a harward surface. If you compile this to a win32 programm and run this on a system that can provide the hardware surface, then SDL is using DirectX. If you cant get the HW surface then SDL switches to wingdi. The same holds for sounds keybords, joysticks etc.... It is all taken care off by the SDL.dll. If you now take your source and complies it on linux or on a mac, then you get a binary that ask the "SDL.dll" on these platforms to interface with the appropriate API''s....

Share this post


Link to post
Share on other sites
Hey!

If you''re going to use SDL for graphics, you''d be better off using it for input(etc) also. It will just decrease speed and be more trouble to use DirectX with SDL (if it''s even possible.. I''m not sure). Besides, input in SDL is very simple to implement, and just as powerful as DirectX.

If you''re confused with how to use SDL for input, I can post an example or email you an example project.

------------------------------
Simple DirectMedia Layer:

Main Site - (www.libsdl.org)
Cone3D Tutorials- (cone3D.gamedev.net)
GameDev.net''s Tutorials - (Here)

OpenGL:

Main Site - (www.opengl.org)
NeHe Tutorials - (nehe.gamedev.net)
Online Books - (Red Book) (Blue Book)

Share this post


Link to post
Share on other sites
quote:
Original post by Drizzt DoUrden
Hey!

If you''re going to use SDL for graphics, you''d be better off using it for input(etc) also. It will just decrease speed and be more trouble to use DirectX with SDL (if it''s even possible.. I''m not sure). Besides, input in SDL is very simple to implement, and just as powerful as DirectX.

If you''re confused with how to use SDL for input, I can post an example or email you an example project.

------------------------------
Simple DirectMedia Layer:

Main Site - (www.libsdl.org)
Cone3D Tutorials- (cone3D.gamedev.net)
GameDev.net''s Tutorials - (Here)

OpenGL:

Main Site - (www.opengl.org)
NeHe Tutorials - (nehe.gamedev.net)
Online Books - (Red Book) (Blue Book)



Ok, thanks mate. Could you please e-mail an example project of using SDL to tom_668@hotmail.com.
Thanks for you help,
Tom


______________________________

"Isn''''t it strange that that pig only had one nipple..." - Richard Richard, An Arse Oddity.

Share this post


Link to post
Share on other sites
Tom, it''s a bit rude to ask someone to e-mail you an SDL project when there are plenty of docs at the SDL web site.

http://www.libsdl.org

- Pete

Share this post


Link to post
Share on other sites
Well siaspete is right that it''s better to search, but personally I had trouble figuring it out at first also so I''ll email you an example project, and in the .cpp file, I''ll comment at the top telling you what to do.

You''ll recieve it some time tonight.

------------------------------
Simple DirectMedia Layer:

Main Site - (www.libsdl.org)
Cone3D Tutorials- (cone3D.gamedev.net)
GameDev.net''s Tutorials - (Here)

OpenGL:

Main Site - (www.opengl.org)
NeHe Tutorials - (nehe.gamedev.net)
Online Books - (Red Book) (Blue Book)

Share this post


Link to post
Share on other sites
Ok thanks mate, but I still haven''t received your e-mail.
Again, thank you.

______________________________

"Isn''''t it strange that that pig only had one nipple..." - Richard Richard, An Arse Oddity.

Share this post


Link to post
Share on other sites

  • Advertisement