Results 1 to 10 of 53

Thread: Graphics libraries.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Quote Originally Posted by Chesso View Post
    So from what I read, it does it's own 2D magic, and also cranks out Direct3D and OpenGL, so I assume you can combine them to some extent, and basically to move on and up I will not have to change libraries or anything like that.
    Yes and then not quite. SDL is it's own graphics API, input API, sound API, etc... You can use OpenGL with it, but you have to set it up as such. It then has functions that will help support OpenGL textures(sprites, etc) and different image formats, but that's it. The setup is a little different. There aren't any functions that help with Direct3D nor does it actually use it at all.

    It is it's own hardware interface for graphics.

    This does not mean that you cannot use Direct3D for graphics just because you are using SDL for user input and sound, but it's nicer to use OpenGL as it integrates better with it.

    That said, go to the Free Pascal meets SDL site and just read about the setup instructions. It tells you everything you need to know. It's super easy to use and I know of at least one high school that uses it to introduce kids to CS using Pascal that is catching onto it quite fast.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #2
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    However, I now find that OpenGl is just that much nicer than sdl. I can't quite put the words on it but the closest mumbo-jumbo to that would be that opengl is more refined. However, since it is that much more complex, I figured I'd come up with Prometheus to make it 'nice' or 'pretty'... And to be honest, I now officially use it as the basis for everything I code. ! line to get a window... 1 line to load an image, 1 line to rotate said image and etc. It's just so much nicer. And did I mention that thanks to using OpenGL, I get near OpenGl speeds?

    But my point here is, sdl and opengl were practically made for each other. I think it is now fairly widely accepted that sdl isnt the fastest hare in the err... hare-holey-house-thing-that-looks-like-a-rabbits (word of the day there ) but it offers so many formats to load from, and OpenGL gives you that near baremetal speed Sdl doesnt, without many formats though. Combine the 2 though, and its as close to perfection as you are ever going to get.

    So I guess what I am saying, is learn Sdl, Learn OpenGL, and then once that is done, take it a step further by mixing the two. Its an absolutely amazing mix. So basically, you want a graphics library? I say, make your own... You'll know what its designed for, who its designed for and it will be designed to suit your needs. Yay.

    cheers,
    code_glitch

    PS: Sorry for the long post. =/
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •