Results 1 to 8 of 8

Thread: How to use SFML with Free Pascal?

  1. #1

    Question How to use SFML with Free Pascal?

    Hi, I'm pretty new to programminig so I'm not too sure how I would achieve this. I'd like to use SFML, which is a modern alternative to SDL 1.2 ( http://www.sfml-dev.org/ ) with Free Pascal as my main programing language. SFML is written in C++ and has a C binding.

    Would I have to make a Pascal binding for SFML? Could I do the front end in C++ and the backend in Pascal?

    I really don't know how to get started with this.

  2. #2
    That's not a trivial task although I would like to see a Free Pascal binding for SFML. For a first start I would recommend the document "How to use C code in Free Pascal projects" which can be found here: ftp://ftp.freepascal.org/fpc/docs-pdf/CinFreePascal.pdf
    This could be interesting, too: http://wiki.freepascal.org/Common_pr...C_header_files
    Best regards,
    Cybermonkey

  3. #3
    These links could be useful too:
    Usinc C Objects in Delphi
    http://rvelthuis.de/articles/articles-cobjs.html

    Using C++ Object in Delphi
    http://rvelthuis.de/articles/articles-cppobjs.html

    cheers,
    Paul

  4. #4
    A long time ago I started some bindings with SFML 1.5. I never got very far, I just did some basic window and system modules. If you want to start with some new bindings, you should use the C bindings. It's much easier to work with and doesn't involve for you to write some C/C++ code.
    But I don't think it's a good idea to start make some bindings right now as the release of SFML 2.0 is just a matter of days/weeks/months.
    Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
    Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)

    Programmer: A device for converting coffein into software.

  5. #5
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Well translating header files from C to Pascal is nothing new ans you can tell from the amount of documentation. Starting on a completely new translation will mean it will take some time before you can actually start to see it's use. This also means if you start such a project, you may be tied to it for a while. Consider that before you start such a project.

    It would also help to gather some collaborators to help with the translation, depending on the complexity of the libraries you are supporting.

    SFML is new to me so I'll have to check it out myself, though I still find SDL to be quite handy for learning the basics of game programming. What advantages over SDL does SFML bring to the table?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  6. #6
    Any news about the bindings? The SFML page reports:
    SFML 2.0 RC is out
    Best regards,
    Cybermonkey

  7. #7
    Take a look at this fresh new binding for the Free Pascal Compiler:

    https://github.com/DJMaster/csfml-fpc

    Strongly tested under Windows. Other OSs will be availble soon.









    Attached Images Attached Images
    Last edited by DJMaster; 22-09-2016 at 09:43 PM.

  8. #8
    DJMaster's seems to be the one that has been updated more recently.

    There's also another binding here: https://github.com/CWBudde/PasSFML

    One can keep up with bindings here: http://www.sfml-dev.org/download/bindings.php

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
  •