SFML Support in Haiku

Hello I am building a multi platform proprietary game based on managing nations of Imperial Age (Cira 1760) where you control one of great powers of time- British Empire, Maratha Empire, French Empire, Spanish Empire, Dutch Empire, Russian Empire, German Empire, Ottoman Empire or Qing Empire (Manchu) and lead it to glory.

My Game Engine uses SFML and the lanuncher use wxWidgets. I have implemented a small subset of wxWidgets I use, based on Haiku API.

To compile latest SFML I need cmake and following libraries
pthread
opengl
xlib
xrandr
freetype
glew
jpeg
sndfile
openal
Are they available under GCC2 Hybrid or GCC4 hybrid?

Hi,


I’m interested in seeing your wxWidgets wrapper. Do you plan to open source that? It could be useful in other places as well.

We don't have an SFML port yet. From your list, here is what I think we have:

  • pthreads: included in Haiku's libroot. Just remove -lphtread from the compiler command line. CMake find_threads should do the right thing.
  • cmake: version 2.8.11.2 available at haikuports
  • OpenGL: part of Haiku
  • Freetype: part of Haiku
  • glew, jpeg, openal: available at haikuports (with a patch to OpenAL adding support for Haiku audio API)
  • xlib, xrandr: I think we have ports, but it won't help you getting SFML to display something, because we don't use X11. Instead, the OpenGL context should use a BGLWindow.

    So, get started with haikuporter (http://www.haikuports.org) and build these libraries yourself. You must use one of Haiku nightly builds for this, as we now have a package manager and haikuporter was modified to build packages for it. The alpha releases don't support this yet. We are still in the process of filling in the pre-built package repository, so packages are slowly being added there. We will speed this process as the release gets closer.

Hello, thanks for the detailed help! I do plan to release my wx wrapper under MIT compatible license. But it wouldn’t be complete wrapper, it would only contain basic GUI and string classes.
Game Engine don’t render any graphics yet, currently it just reads data and do events, etc. So pretty much we still have a choice between SDL2 and SMFL. I would try to build SMFL and experiment with SDL2 on the latest nightly build I downloaded yesterday.
SDL2’s Platform Support readme says there is an unofficial SDL2 port maintained by Axel Dörfler. Did you guys really got a working SDL2?

Checking at the Haikuports I found libsdl indeed have a .bep recipe for SDL2! But couldn’t find SDL2 components, SDL complements are all SDL 1.x specific :frowning:

Yes, our SDL2 port is in a better state. We didn’t write recipes for the accompanying libraries (SDL_image, SDL_ttf, …), but these are fairly easy to do as they don’t have much platform specific parts. Adding recipes for those should be easy. I think the only reason we don’t have them yet is no one tried to port an SDL2 game yet. But we have the examples working, so most of the work is done.

Yes, our SDL2 port is in a better state. We didn’t write recipes for the accompanying libraries (SDL_image, SDL_ttf, …), but these are fairly easy to do as they don’t have much platform specific parts. Adding recipes for those should be easy. I think the only reason we don’t have them yet is no one tried to port an SDL2 game yet. But we have the examples working, so most of the work is done.

Wasn’t there a wxport… on osdrawer.net… but i couldnt fint it on the git archive…
This looks like it could be this port:
http://sourceforge.net/p/wxhaiku/code/ci/master/tree/
even some older stuff …
but maybe it helps :slight_smile:
http://developer.berlios.de/svn/?group_id=8099