PDA

View Full Version : SDL2_gfx object pascal bindings?



Raith
08-06-2014, 10:02 PM
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?

code_glitch
09-06-2014, 07:05 AM
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 :D). 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/showthread.php?23411-SDL-2-0-for-Pascal which seem to be quite up to date (at least as much as bindings need be).

Cybermonkey
09-06-2014, 12:01 PM
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 :D). 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/member.php?4539-Freepascal-meets-SDL) ;) Which actually means that the tutorials are way better than if I wrote it ... :)

Raith
09-06-2014, 04:40 PM
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 :D). 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/showthread.php?23411-SDL-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.

code_glitch
09-06-2014, 08:10 PM
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 :/

Cybermonkey
09-06-2014, 08:51 PM
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 ...

Raith
10-06-2014, 09:16 PM
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.

Matthias
17-03-2015, 11:11 PM
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 :-).

Cybermonkey
21-03-2015, 09:33 AM
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.