Catalog · How the catalog works
SFML
Delphi headers for SFML
- ★ 1 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README

SFML
Simple Fast Multimedia Layer
Pascal bindings that allow you to use SFML and other useful C libraries with Delphi.
Included
- CSFML (https://github.com/SFML/CSFMLL
- pl_mpeg (https://github.com/phoboslab/pl_mpegg
- Nuklear (https://github.com/Immediate-Mode-UI/Nuklearr
- physfs (https://github.com/icculus/physfss
- minizip (https://github.com/madler/zlibb
Minimum Requirements
- Windows 10+ (64 bits)
- Delphi Community Edition (Win64 platform only)
Usage
You simply add SFML to your uses section and everything will be linked in your executable, ready for use with no DLLs to maintain. You will have direct access to all the aforementioned libraries.
uses
System.SysUtils,
SFML;
var
Mode: sfVideoMode;
Window: PsfRenderWindow;
Event: sfEvent;
Music: PsfMusic;
begin
Mode.Width := 800;
Mode.Height := 600;
Mode.BitsPerPixel := 32;
Window := sfRenderWindow_create(Mode, 'Hello SFML', sfResize or sfClose, nil);
Music := sfMusic_createFromFile('arc/audio/music/song01.ogg');
sfMusic_play(Music);
while sfRenderWindow_isOpen(Window) = sfTrue do
begin
while sfRenderWindow_pollEvent(Window, @Event) = sfTrue do
begin
if Event._type = sfEvtClosed then
sfRenderWindow_close(Window);
end;
sfRenderWindow_clear(Window, DARKSLATEBROWN);
sfRenderWindow_display(Window);
end;
sfMusic_stop(Music);
sfMusic_destroy(Music);
sfRenderWindow_destroy(Window);
end.Support


