CSFML V2

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

CSFML V2

Postby D.J.Peters » May 08, 2018 16:51

download: csfml2.zip

Joshy

fbc test01.bas -x bin/win32/test01.exe
or
fbc test01.bas -x bin/win64/test01.exe
...

tetsted on Windows XP 32-bit, Windows 10 64-bit and Linux Ubuntu and Slackware 64-bit.
Image
Image
here are how I create the working import libraries for win32:

Code: Select all

d:\FreeBASIC\bin\win32\dlltool.exe -d csfml-audio-2.def -l libcsfml-audio-2.dll.a
d:\FreeBASIC\bin\win32\dlltool.exe -d csfml-graphics-2.def -l libcsfml-graphics-2.dll.a
d:\FreeBASIC\bin\win32\dlltool.exe -d csfml-network-2.def -l libcsfml-network-2.dll.a
d:\FreeBASIC\bin\win32\dlltool.exe -d csfml-system-2.def -l libcsfml-system-2.dll.a
d:\FreeBASIC\bin\win32\dlltool.exe -d csfml-window-2.def -l libcsfml-window-2.dll.a
d:\FreeBASIC\bin\win32\dlltool.exe -d libsndfile-1.def -l liblibsndfile-1.dll.a
d:\FreeBASIC\bin\win32\dlltool.exe -d openal32.def -l libopenal32.dll.a
pause
and win64:

Code: Select all

d:\FreeBASIC\bin\win64\dlltool.exe  -m i386:x86-64 --as-flags --64 -d csfml-audio-2.def -l libcsfml-audio-2.dll.a
d:\FreeBASIC\bin\win64\dlltool.exe  -m i386:x86-64 --as-flags --64 -d csfml-graphics-2.def -l libcsfml-graphics-2.dll.a
d:\FreeBASIC\bin\win64\dlltool.exe  -m i386:x86-64 --as-flags --64 -d csfml-network-2.def -l libcsfml-network-2.dll.a
d:\FreeBASIC\bin\win64\dlltool.exe  -m i386:x86-64 --as-flags --64 -d csfml-system-2.def -l libcsfml-system-2.dll.a
d:\FreeBASIC\bin\win64\dlltool.exe  -m i386:x86-64 --as-flags --64 -d csfml-window-2.def -l libcsfml-window-2.dll.a
d:\FreeBASIC\bin\win64\dlltool.exe  -m i386:x86-64 --as-flags --64 -d libsndfile-1.def -l liblibsndfile-1.dll.a
d:\FreeBASIC\bin\win64\dlltool.exe  -m i386:x86-64 --as-flags --64 -d openal32.def -l libopenal32.dll.a
pause
Last edited by D.J.Peters on May 09, 2018 2:13, edited 6 times in total.
paul doe
Posts: 553
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: FB SFML V2

Postby paul doe » May 08, 2018 17:02

D.J.Peters wrote:...
But I self never test any part of the lib's.
...

Thanks, Joshy. I already pointed the member that asked for it to this thread. If/when I find the time, I'll test that it works and report back.
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

Re: FB SFML V2

Postby D.J.Peters » May 08, 2018 18:03

By the way it's Version 2.2 the last with an C interface
Version 2.4 and higher are C++ only ! (so far I know)

I self don't need it, for me it's:
Window.bi is fbgfx.bi
Network is snc.bi
Audio.bi is fbsound.bi
Graphics.bi is fbimage.bi and fbtruetype.bi
System.bi is FreeBASIC mutex, threads and sleep
...

I let you know if it's done, first I need a cool bottle of beer :-)
It was a really warm day with a lot of work here in good old Germany.

Joshy
Last edited by D.J.Peters on May 09, 2018 0:16, edited 2 times in total.
PaulSquires
Posts: 681
Joined: Jul 14, 2005 23:41
Contact:

Re: FB SFML V2

Postby PaulSquires » May 08, 2018 18:15

D.J.Peters wrote:I let you know if it's done, first I need a cool bottle of beer :-)
It was a really warm day with a lot of work here in good old Germany.

You deserve that beer - I really appreciate all the code you share.
paul doe
Posts: 553
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: FB SFML V2

Postby paul doe » May 08, 2018 18:33

D.J.Peters wrote:By the way it's Version 2.2 the last with an C interface
Version 2.4 and higher are C++ only ! (so far I know)

Nope. Check here: https://www.sfml-dev.org/download/bindings.php. It has all the bindings for all available languages.
D.J.Peters wrote:I self don't need it, for me it's:
...

Me neither, I already have my own framework to work with (and in fact, I find SFML quite limited). However, it could present a more 'sane' alternative to SDL, especially for beginners (don't need to pack a crapton of DLLs)
D.J.Peters wrote:I let you know if it's done, first I need a cool bottle of beer :-)
It was a really warm day with a lot of work here in good old Germany.

By all means, you deserve it. Prost! ;)
badidea
Posts: 823
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: FB SFML V2

Postby badidea » May 08, 2018 19:15

Don't drink too much beer, there are still some ";" and "void" and some other c-stuff in the bi-files.
Equal
Posts: 6
Joined: Apr 30, 2018 19:40

Re: FB SFML V2

Postby Equal » May 08, 2018 19:22

You deserve your beer! ;-) Full ack!!!
Cheeers and Prost!

I'm a beginner with FreeBasic and with gfx coding!

@Paul Doe
and in fact, I find SFML quite limited

Why do you think so?
I thought SFML is the newest, fastest and perhaps one of the best 2D gfx-libs at the time?

Best regards and many thanx for your great work,
Equal
lizard
Posts: 406
Joined: Oct 17, 2017 11:35
Location: Germany

Re: FB SFML V2

Postby lizard » May 08, 2018 19:45

Equal wrote:I thought SFML is the newest, fastest and perhaps one of the best 2D gfx-libs at the time?

Fbgfx, Cairo, Allegro, today they are all faster than a blink of the eye. Best to use FBs own integrated fbgfx, it is very good and has a easy to understand doc.
paul doe
Posts: 553
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: FB SFML V2

Postby paul doe » May 08, 2018 20:00

Equal wrote:@Paul Doe
and in fact, I find SFML quite limited

Why do you think so?
I thought SFML is the newest, fastest and perhaps one of the best 2D gfx-libs at the time?

Well, perhaps 'limited' is not really the correct term. 'Barebones' is more like it. Then again, I doubt that the authors meant it to be a complete framework for 2D graphics, only to be a lightweight alternative to the more mainstream SDL.
As for its 'newness': it's been around for some time now. Look at some of the posts that were proposed and you'll see that they are from around 2008 =D
Fastest: I didn't benchmarked it yet, so I can't really comment on this. Since it uses OpenGL, I guess it'll be pretty fast. Not that it means much, since setting an OpenGL context in FreeBasic is trivial:

Code: Select all

#include once "fbgfx.bi" '' Useful constants

'' Sets a 1280x720x32 bit OpenGL context
screenRes( 1280, 720, 32, , fb.gfx_openGL )

'' Use GL code to draw

Best: that's a matter of opinion, of course =D
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

Re: FB SFML V2

Postby D.J.Peters » May 08, 2018 23:58

Dam I moved the wrong zip file FBSFML.zip on my server and deleted the right file csfml2.zip locale on my HDD :-(

I rewrote it complete new in 4 hours and it works :-)

Joshy
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

Re: CSFML V2

Postby D.J.Peters » May 09, 2018 0:50

I added a data folder with a *.ttf font, *.ogg music *.jpg image
and build test01.exe for win32 and win64 in /bin/win32/test01.exe and bin/win64/test01.exe

Image

Joshy
paul doe
Posts: 553
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: CSFML V2

Postby paul doe » May 09, 2018 1:49

Excellent work, Joshy. Congratulations!

Will test it soon, and see what cool thing can I come up with =D
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

Re: CSFML V2

Postby D.J.Peters » May 09, 2018 2:10

I added many missing libs and links for Linux 64-bit
libGLEW.so.1.10
libGLEW.so.1.13.0
libsfml-audio.so.2.2
libsfml-audio.so.2.2.0
libsfml-graphics.so.2.2
libsfml-graphics.so.2.2.0
libsfml-network.so.2.2.0
libsfml-system.so.2.2
libsfml-system.so.2.2.0
libsfml-window.so.2.2
libsfml-window.so.2.2.0


cd cfsml2
sudo cp ./bin/lin64/*.* /usr/lib/
fbc test01.bas -x ./bin/lin64
cd ./bin/lin64
./test01
Image
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

Re: FB SFML V2

Postby D.J.Peters » May 09, 2018 2:40

paul doe wrote:Nope. Check here: https://www.sfml-dev.org/download/bindings.php. It has all the bindings for all available languages.
CSFML 2.2 was last with working binaries for MAC,Win32,Win64,Lin32,Lin64
CSFML 2.4 binaries are Windows and MAC only.

I don't support Windows only f*** ;-)

Joshy
paul doe
Posts: 553
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: FB SFML V2

Postby paul doe » May 09, 2018 3:09

D.J.Peters wrote:CSFML 2.2 was last with working binaries for MAC,Win32,Win64,Lin32,Lin64
CSFML 2.4 binaries are Windows and MAC only.

You either had too much sleep deprivation, or too much beer =D

https://www.sfml-dev.org/download/sfml/2.4.2/

And, since the source is provided, you can build it for any platform you want.

Return to “Libraries”

Who is online

Users browsing this forum: No registered users and 2 guests