SFML community forums

Help => Graphics => Topic started by: aisman on April 22, 2008, 07:43:34 pm

Title: sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
Post by: aisman 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'
Title: sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
Post by: Laurent 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.
Title: sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
Post by: dabo on April 22, 2008, 09:09:19 pm
So "OptimizeForNonOpenGL" is default now? Or what are you saying?
Title: sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
Post by: workmad3 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.
Title: sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
Post by: dabo 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 :)
Title: sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
Post by: Julien_v42 on April 23, 2008, 03:43:22 pm
Default (preserve = false, or optimize = true) is OK for you if you don't use OpenGL.
Title: sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
Post by: Laurent 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 ;)
Title: sf::RenderWindow::OptimizeForNonOpenGL(true) not in SVN?
Post by: dabo 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