Results 1 to 9 of 9

Thread: SDL2_gfx object pascal bindings?

  1. #1

    SDL2_gfx object pascal bindings?

    Has anyone encountered SDL2_gfx bindings for object pascal, specifically delphi (XE and up)? I cant find any traces of it existing, so it's just possible no one has done it yet, at least without releasing it to the general public. Then again, finding up to date SDL_gfx wasnt easy when I tried a year ago... Could someone help me out?

  2. #2
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Hey there Raith, welcome to the forums if no-ones said so already - I know there are bindings for pascal and SDL2 though I don't recall the SDL2_gfx unit myself I know that there is http://www.freepascal-meets-sdl.net/ which is a very good set of tutorials regarding setting up SDL and getting started in it (at least they were when I read them for SDL 1 a few years ago ). That said, I believe our own cybermonkey maintains the pages over there so I expect the new tutorials are just as great as their predecessors if not better,

    A quick google also found this https://github.com/ev1313/Pascal-SDL-2-Headers which as the name implies, looks like SDL2 bindings for pascal (and by extension lazarus and delphi) which seems to have been posted up by another PGD member over here: http://www.pascalgamedevelopment.com...2-0-for-Pascal which seem to be quite up to date (at least as much as bindings need be).
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  3. #3
    Quote Originally Posted by code_glitch View Post
    Hey there Raith, welcome to the forums if no-ones said so already - I know there are bindings for pascal and SDL2 though I don't recall the SDL2_gfx unit myself I know that there is http://www.freepascal-meets-sdl.net/ which is a very good set of tutorials regarding setting up SDL and getting started in it (at least they were when I read them for SDL 1 a few years ago ). That said, I believe our own cybermonkey maintains the pages over there so I expect the new tutorials are just as great as their predecessors if not better,
    Sorry to disagree, but the maintainer of freepascal-meets-sdl.net is MatthiasM a.k.a. on this forum as Freepascal-meets-SDL (http://www.pascalgamedevelopment.com...scal-meets-SDL) Which actually means that the tutorials are way better than if I wrote it ...
    Best regards,
    Cybermonkey

  4. #4
    Quote Originally Posted by code_glitch View Post
    Hey there Raith, welcome to the forums if no-ones said so already - I know there are bindings for pascal and SDL2 though I don't recall the SDL2_gfx unit myself I know that there is http://www.freepascal-meets-sdl.net/ which is a very good set of tutorials regarding setting up SDL and getting started in it (at least they were when I read them for SDL 1 a few years ago ). That said, I believe our own cybermonkey maintains the pages over there so I expect the new tutorials are just as great as their predecessors if not better,

    A quick google also found this https://github.com/ev1313/Pascal-SDL-2-Headers which as the name implies, looks like SDL2 bindings for pascal (and by extension lazarus and delphi) which seems to have been posted up by another PGD member over here: http://www.pascalgamedevelopment.com...2-0-for-Pascal which seem to be quite up to date (at least as much as bindings need be).
    Thanks for the welcome. I know all the resources, but the headers at github dont have gfx or anything relating to it, since afaik it's not part of the standard "SDL" package and is developed sort of separatelly, therefore headers are done separatelly as well. So was just wondering if someone knew some other resource or something. In the meantime author of gfx told me that he has not yet heard of anyone working on headers for gfx, so chances are they dont exit.

  5. #5
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Cybermonkey: I stand corrected. Sorry about that Matthias!

    Edit: for some reason I spaced and though that was a reply without the reply bit... Good job brain...

    On the sdl_gfx note I recall that because they were a bit slow, OpenGL was used in their place a lot of the time (I know I did a whole bunch - which is how I first got started in OpenGL) though from what I've seen Tim's are the only headers for pascal so if he hasn't got them - I don't think anyone has. Sorry :/
    Last edited by code_glitch; 09-06-2014 at 08:21 PM.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  6. #6
    The question is: For what do you need the SDL2_gfx library? Maybe it can be done without it. For example for my old framework based on SDL 1.2 I needed SDL_gfx but for my newer one based on SDL 2 I don't need it anymore ...
    Best regards,
    Cybermonkey

  7. #7
    Quote Originally Posted by Cybermonkey View Post
    The question is: For what do you need the SDL2_gfx library? Maybe it can be done without it. For example for my old framework based on SDL 1.2 I needed SDL_gfx but for my newer one based on SDL 2 I don't need it anymore ...
    Yeah I know you can draw very basic stuff with SDL2 now, squares, lines and such, but no circles, ellipses, bezier curves etc, or just filled/outlined shapes. I suppose you could draw pretty much anything manipulating pixels, but why reinvent the wheel if someone already has created easy to use methods. The usefulness of SDL2_gfx still has to be determined, especially with the addition of textures etc. I am really asking not because I'm migrating to SDL2 and have something relying heavily on gfx, but should I even count on it in the future or try to meet my needs without it.

  8. #8
    Hi Raith and everybody.

    It seems Tim Blume's SDL2 units got extended by the SDL2_gfx bindings about two months ago. Have a look here: https://github.com/ev1313/Pascal-SDL-2-Headers.

    I had no time to try them out or even extend my tutorial. Anyway, I will check it out for sure in the future.

    EDIT: Last but not least I appreciated the kind words you found about my tutorials . Just in case it may be interesting for some reader, I'm preparing a major update of the site, so expect some cool new features there :-).
    Last edited by Matthias; 17-03-2015 at 11:14 PM.

  9. #9
    Your tutorials are essential! Without them I'd never chose SDL for my little game engine. Keep up that great work! I am looking forward to seeing the update of your site.
    Best regards,
    Cybermonkey

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
  •