Probably sounds n00bish but...

Started by
6 comments, last by Tom007 22 years, 1 month ago
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.
______________________________"Isn''t it strange that that pig only had one nipple..." - Richard Richard, An Arse Oddity.
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.
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....
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)
------------------------------Put THAT in your smoke and pipe it
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.
______________________________"Isn''t it strange that that pig only had one nipple..." - Richard Richard, An Arse Oddity.
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
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)
------------------------------Put THAT in your smoke and pipe it
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.
______________________________"Isn''t it strange that that pig only had one nipple..." - Richard Richard, An Arse Oddity.

This topic is closed to new replies.

Advertisement