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

Author Topic: Mixing opengl && sf::sprite  (Read 1870 times)

0 Members and 1 Guest are viewing this topic.

kaB00M

  • Full Member
  • ***
  • Posts: 101
    • View Profile
    • Caffeware
    • Email
Mixing opengl && sf::sprite
« on: October 17, 2011, 06:40:22 am »
Hi. I'm wondering if someone can make a tut for using opengl along with sf::sprites. I want to draw opengl polygons in top of sprite backgrounds. Is that even possible?

Thank you.



Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Mixing opengl && sf::sprite
« Reply #1 on: October 17, 2011, 07:54:28 am »
There's an example in the SFML SDK that does exactly what you want.
Laurent Gomila - SFML developer

kaB00M

  • Full Member
  • ***
  • Posts: 101
    • View Profile
    • Caffeware
    • Email
Mixing opengl && sf::sprite
« Reply #2 on: October 18, 2011, 01:32:35 am »
:oops:  Oops... I'm sorry about that good Sir.
I got the thing to work, but now I have a new issue: my fps drops from 60~, to 15~ by just calling PreserveOpenGLStates(true). Even if I don't draw any polygons!!! Is that normal? I think I will just stick with 2d for now.

Thank you.



Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Mixing opengl && sf::sprite
« Reply #3 on: October 18, 2011, 08:01:59 am »
Quote
my fps drops from 60~, to 15~ by just calling PreserveOpenGLStates(true)

In Debug or Release mode?
Laurent Gomila - SFML developer

 

anything