sdl

This is a discussion on sdl within the Game Programming forums, part of the General Programming Boards category; i was checking out sdl, and it looks like it is only a header file that is manipulated using C. ...

  1. #1
    essence of digital xddxogm3's Avatar
    Join Date
    Sep 2003
    Posts
    589

    sdl

    i was checking out sdl, and it looks like it is only a header file that is manipulated using C.
    is this accurate?
    "Hence to fight and conquer in all your battles is not supreme excellence;
    supreme excellence consists in breaking the enemy's resistance without fighting."
    Art of War Sun Tzu

  2. #2
    Registered User caroundw5h's Avatar
    Join Date
    Oct 2003
    Posts
    751
    Quote Originally Posted by xviddivxoggmp3
    i was checking out sdl, and it looks like it is only a header file that is manipulated using C.
    is this accurate?

    Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of "Civilization: Call To Power."
    its not a header. you include the header and link the library to your project to use the relevant functions from the library. It has a C interface yes. but its not just a header.


    website

  3. #3
    essence of digital xddxogm3's Avatar
    Join Date
    Sep 2003
    Posts
    589
    so when you say interface, do you mean that sdl and opengl is it's own language that is dependent on another language to impliment it. (in this case c)? i was on the website that you posted and saw some code that looked just like c.
    "Hence to fight and conquer in all your battles is not supreme excellence;
    supreme excellence consists in breaking the enemy's resistance without fighting."
    Art of War Sun Tzu

  4. #4
    Registered User caroundw5h's Avatar
    Join Date
    Oct 2003
    Posts
    751
    Quote Originally Posted by xviddivxoggmp3
    so when you say interface, do you mean that sdl and opengl is it's own language that is dependent on another language to impliment it. (in this case c)? i was on the website that you posted and saw some code that looked just like c.

    SDL is written in C, but works with C++ natively, and has bindings to several other languages, including Ada, Eiffel, Java, Lua, ML, Perl, PHP, Pike, Python, and Ruby.


    openGL is a different library but is incorporated into SDL. they aren't a language. they are a library, a set of functions and routines to simplfy your life. diferent libraries do dif things. this one just happens to work with your cd room, and video. A library just makes your life easier so you don't have to code it yourself.
    kinda like when you #include <stdio.h> in c, this is a header that allows you access C's i/o functions. without which you'd have to code your own i/o routines in assembly.

    hope that clears it up.

  5. #5
    ---
    Join Date
    May 2004
    Posts
    1,379
    A library is a "library" of functions used to manipulate your computer.
    SDL is written in C, but works with C++ natively

  6. #6
    essence of digital xddxogm3's Avatar
    Join Date
    Sep 2003
    Posts
    589
    Quote Originally Posted by caroundw5h
    openGL is a different library but is incorporated into SDL.
    Do you mean that SDL has all the library functions of sdl?
    Does this mean you can write video games with sdl, w/o using opengl?
    Or do you use both together to create the games?
    "Hence to fight and conquer in all your battles is not supreme excellence;
    supreme excellence consists in breaking the enemy's resistance without fighting."
    Art of War Sun Tzu

  7. #7
    ---
    Join Date
    May 2004
    Posts
    1,379
    SDL has:
    Video
    Window Management
    Event Handling
    Joystick Handling
    Audio
    CD-ROM
    Multi-threading
    and Time functions.

    you can use all of these together to make a 2D apps or use the Window Management functions to setup OpenGL to make 3D apps

    You would probably understand more if you went to the site and read the docs

  8. #8
    essence of digital xddxogm3's Avatar
    Join Date
    Sep 2003
    Posts
    589
    thank you for the information.
    I have checked out the site, and documents.
    i haven't had time to get to indepth, due to the semester is getting really close to finals week.
    i'm just trying to get some misc. details to determine if that is what i want to learn over christmas break.
    thank you to all that have provided clarification.
    it helped me make my decision.
    "Hence to fight and conquer in all your battles is not supreme excellence;
    supreme excellence consists in breaking the enemy's resistance without fighting."
    Art of War Sun Tzu

  9. #9
    ---
    Join Date
    May 2004
    Posts
    1,379
    SDL is fun and easy to learn

  10. #10
    Registered User caroundw5h's Avatar
    Join Date
    Oct 2003
    Posts
    751
    I take it you code in C. if you don't, another language called http://www.pygame.org/ has a module in it called pygame which uses SDL . browse the site, maybe even learn python, its really easy to pick up, guranteed you'll get it in a couple hours max, and then use the pygame module and I gurantee you'll enjoy it. let me know how it turns out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SDL + Newbie
    By Livijn in forum Game Programming
    Replies: 7
    Last Post: 04-30-2007, 11:20 PM
  2. Problems compiling this SDL app
    By Rider in forum C++ Programming
    Replies: 3
    Last Post: 03-27-2007, 12:22 PM
  3. SDL and MinGW Studio
    By Vicious in forum Tech Board
    Replies: 0
    Last Post: 07-30-2004, 09:59 PM
  4. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 12:19 AM
  5. sdl in c++
    By Klinerr1 in forum C++ Programming
    Replies: 8
    Last Post: 07-07-2002, 07:46 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21