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

Author Topic: SFML 2 and FBOs?  (Read 2189 times)

0 Members and 1 Guest are viewing this topic.

PaloDeQueso

  • Newbie
  • *
  • Posts: 16
    • AOL Instant Messenger - palodequeso
    • View Profile
    • http://www.palodequeso.net
    • Email
SFML 2 and FBOs?
« on: February 21, 2011, 10:41:30 pm »
I recently decided to update to SFML2 because of the RenderImage feature so I can finally render text to images once again. (Something I've missed from my SDL days) But as soon as I did, my FBOs are always rendering blank. NOTE: I didn't try to change anything, I just turned off all text features that I had before and recompiled my Engine with SFML2. Suddenly my deferred renderer is completely broken. Anyone else experience any issues with SFML 2 and FBOs?
Douglas E Reisinger II
http://www.palodequeso.net

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 2 and FBOs?
« Reply #1 on: February 21, 2011, 10:50:32 pm »
If you mix SFML and OpenGL you must save/restore your states, because SFML will mess them up (and vice versa). There are the SaveGLStates and ResotreGLStates functions for that.
Laurent Gomila - SFML developer

PaloDeQueso

  • Newbie
  • *
  • Posts: 16
    • AOL Instant Messenger - palodequeso
    • View Profile
    • http://www.palodequeso.net
    • Email
awesome...
« Reply #2 on: February 22, 2011, 03:16:53 pm »
Thanks for the tip...

On that note I decided to try using SFML2 again... unfortunately I'm stuck in winblows here at work, and am using MinGW.

- I compiled SFML2 from the latest snapshot.
- Copied the includes, libs, and bins to the mingw and system32 directories and removed the old libsfml files

now I'm getting this...

..\..\ElementGames\Engine\libegengine.a(Application.cpp.obj):Application.cpp:(.text+0x238): undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKSsmRKNS_14WindowSettingsE'

But as far as I can tell, I'm not using WindowSettings anymore?

I'll grep through my code to double check... but I wanted to throw this one out there. It's something I didn't encounter last time I tried SFML2.

Here is my RenderWindow create line:
Code: [Select]
sfml_application = new sf::RenderWindow(sf::VideoMode(resolution_width, resolution_height), "ElementGamesTest", ((fullscreen) ? sf::Style::Fullscreen : sf::Style::Close));
Douglas E Reisinger II
http://www.palodequeso.net

PaloDeQueso

  • Newbie
  • *
  • Posts: 16
    • AOL Instant Messenger - palodequeso
    • View Profile
    • http://www.palodequeso.net
    • Email
[SOLVED]
« Reply #3 on: February 22, 2011, 03:37:06 pm »
I fixed that last issue, sorry for the spam on the forum without proper debugging/coding practices. I love this library and thanks for all of the quick help!
Douglas E Reisinger II
http://www.palodequeso.net