OpenGl Preserve States (SFML)

So I did read what you guys suggested however it said also that it was memory intensive and I had a question... I also came across this:

1
2
3
    Window.pushGLStates();
    Window.draw("Sfml Text");
    Window.popGLStates();


The problem here is that none of these commands exist!
Window.draw should exist and even though I have all the proper includes I still get it telling me that 'Draw' is not a member of sf::Window

I have encountered that error many times everywhere across my sfml related code, it's not like they removed all those features in the update (Which they did not) but, why then would it not be a member?
Are you looking at 2.0 code while you're using 1.6 perhaps?
But I checked throughout the entire class and not a single function resembles what I'm looking for.

I have all the includes but it seems like so much is missing...
And yes, I did check to make sure everything was the right version. (If it wasn't there should be at least a recognizable alternative...)
for 1.6 it would be Window.Draw() (note that neither 2.0 or 1.6 has a RenderWindow::D(d)raw overload for string literals) and Window.PreserveOpenGLStates().

Another possibility might be that you're using a Window as opposed to a RenderWindow object.
What is great here is that I though I was using a RenderWindow the entire time, but after a lot of configuration I have reached a stopping point, more pointless than the first:

RenderWindow is not a member of sf::

For safety I included ALL sfml includes and I did not spell RenderWindow wrong or anything I checked sf:: and there was no RenderWindow only Window...

For the recorder I also noticed the Window.PreserveOpenGLStates() but it said it was memory intensive first; and seconds it did not exist when I checked.
Last edited on
For safety I included ALL sfml includes and I did not spell RenderWindow wrong or anything I checked sf:: and there was no RenderWindow only Window...


Sounds like there is something wrong with your installation.
Ok, that is honestly strange...

All the nice little microsoft developed drop down windows say RenderWindow does exist AND Its in the code, but it still says it does not exist.
Everything else works though, could it be since maybe renderwindows can not be used with openGL rendering at the same time?
Topic archived. No new replies allowed.