SFML community forums

Help => Graphics => Topic started by: Afr0 on March 12, 2012, 02:50:34 pm

Title: PreserveOpenGLStates
Post by: Afr0 on March 12, 2012, 02:50:34 pm
Can someone give me a list of states preserved by PreserveOpenGLStates()?
I tried looking this up in the C# documentation, but it wasn't mentioned.
I really want to use SFML for rendering, because I can't figure out how to render the way I need to using XNA, but SFML seems to be doing some weird coordinate system changes that prevents OpenGL rendering from working the way it does in C and C++ (animations are fucked up, and when rendering triangles all seem to be rendered in the same place).
I tried editing the Nehe example in the Tao distribution to ensure that this was in fact a problem with SFML, but the Tao examples all keep crashing my computer (even when I compile as 32bit, as I'm on a 64bit system).

I also tried disabling the states by calling App.PreserveOpenGLStates(false), but that made me unable to render anything at all (except the SFML image).
Title: Re: PreserveOpenGLStates
Post by: coolhome on March 12, 2012, 08:07:32 pm
Just out of curiosity why do you want to use SFML with XNA? I see no point in attempting to use both. It would be too painful with no benefit.
Title: PreserveOpenGLStates
Post by: Afr0 on March 12, 2012, 09:26:33 pm
I'm not trying to use SFML with XNA, I'm trying to use SFML and OpenGL instead of XNA!!
I thought it would be easy but SFML is giving me a really hard time. I need to know specifically which states are preserved when calling RenderWindow.PreserveOpenGLStates()
Title: PreserveOpenGLStates
Post by: Laurent on March 12, 2012, 10:46:57 pm
Quote
I need to know specifically which states are preserved when calling RenderWindow.PreserveOpenGLStates()

Why don't you simply look at the source code? Honestly, I don't remmeber what this function did in SFML 1.6.