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

Author Topic: sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?  (Read 5913 times)

0 Members and 1 Guest are viewing this topic.

aisman

  • Newbie
  • *
  • Posts: 25
    • View Profile
sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
« on: April 22, 2008, 07:43:34 pm »
Use the SFML SVN with VC2008.

Get compiler error:
'OptimizeForNonOpenGL' : is not a member of 'sf::RenderWindow'

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
« Reply #1 on: April 22, 2008, 07:49:21 pm »
You should check the SVN logs, or at least the class header... ;)

In short : OpenGL states are no longer preserved by default (so the default behaviour is more intuitive), and you must call PreserveOpenGLStates if you want SFML to take care of external states.
Laurent Gomila - SFML developer

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
« Reply #2 on: April 22, 2008, 09:09:19 pm »
So "OptimizeForNonOpenGL" is default now? Or what are you saying?

workmad3

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
« Reply #3 on: April 22, 2008, 09:30:17 pm »
The default behaviour has changed from having 'PreserveOpenGLStates(true)' by default and calling it with false to turn it off to being 'PreserveOpenGLStates(false)' by default and requiring you to call the function if you want the functionality turned on.

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
« Reply #4 on: April 23, 2008, 01:44:24 pm »
Quote from: "workmad3"
The default behaviour has changed from having 'PreserveOpenGLStates(true)' by default and calling it with false to turn it off to being 'PreserveOpenGLStates(false)' by default and requiring you to call the function if you want the functionality turned on.


Don't know what "PreserveOpenGLStates" means, but having the default value set to false means it's the same as when you used to set  OptimizeForNonOpenGL to true? I have never used OpenGL, I'm sorry if I'm slow :)

Julien_v42

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://tinyrpgsim.wordpress.com
sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
« Reply #5 on: April 23, 2008, 03:43:22 pm »
Default (preserve = false, or optimize = true) is OK for you if you don't use OpenGL.
Working on TinyRPGSim

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
« Reply #6 on: April 23, 2008, 03:44:40 pm »
Quote
Don't know what "PreserveOpenGLStates" means

It means that if you manage some OpenGL states on your side (ie. if you mix SFML rendering and OpenGL rendering), SFML won't mess them up with its own states.

Quote
having the default value set to false means it's the same as when you used to set OptimizeForNonOpenGL to true?

Correct ;)
Laurent Gomila - SFML developer

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
« Reply #7 on: April 23, 2008, 05:19:20 pm »
Quote from: "Laurent"
Quote
Don't know what "PreserveOpenGLStates" means

It means that if you manage some OpenGL states on your side (ie. if you mix SFML rendering and OpenGL rendering), SFML won't mess them up with its own states.

Quote
having the default value set to false means it's the same as when you used to set OptimizeForNonOpenGL to true?

Correct ;)


Ok, thanks, maybe there still is hope  :D

 

anything