Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML 2.0 and GWEN  (Read 1578 times)

0 Members and 1 Guest are viewing this topic.

Shabla

  • Newbie
  • *
  • Posts: 41
    • View Profile
SFML 2.0 and GWEN
« on: November 27, 2012, 02:22:07 am »
Hi ! In my current game project using SFML 2.0 RC, I've started a quest to find the GUI lib of my dreams that would work together with SFML.

I tried SFGUI, but I found it somewhat missing in features and I had poor performances in the (probably horribly coded) test I made.

Then I tried CEGUI, it looked perfect and very complete, but there doesn't seem to have much support for Windows. I tried to build it (I use VS Express 2010), but no success, even with the tutorial on the subject (both the SFML version and CEGUI version are outdated). In the end I gave up and found out about GWEN.

Now after much fighting with linking errors and whatnot (looks like I'm terrible at this), I finally built GWEN successfully (GWEN static, the SFML renderer and UnitTest). I had to fix some stuff to make it work like lower-casing the first letters of SFML methods and replacing a few methods by their new name (I'm not even certain that these are the right replacements...):
sf::RenderTarget::SaveGLStates() to sf::RenderTarget::pushGLStates()
sf::RenderTarget::RestoreGLStates to sf::RenderTarget::popGLStates()
sf::Text::GetRect() to sf::Text::getGlobalBounds()

I used the SFML sample coming with GWEN and I get this result when the precompiled sample executable gives me this result. My version also crash when I close the window.

My test project has these settings. I tried removing the UnitTest and just displaying a single window, but I get the same result (poor performance and missing graphics). My guess is it has to do with the SFMLRenderer coming with GWEN, but I wouldn't know what is wrong...

If anyone could give me an idea on how I could fix this it would be greatly appreciated, thank you !