SFML community forums
Help => Window => Topic started by: aXyde on November 07, 2009, 01:15:01 pm
-
Hi,
As the topic says: How do i create an OpenGL 3.2 Context with SFML. I saw in some tutorial[1] that for SDL you would just have to call SDL_GL_SetAttribute(). Is there an equivalent way for doing this with SFML?
Greets
[1] http://www.opengl.org/wiki/Tutorial1:_Creating_a_Cross_Platform_OpenGL_3.2_Context_in_SDL_(C_/_SDL)
-
There's no way to do it with SFML 1.5.
In the latest SVN revisions of SFML 2, you can do it like this:
sf::ContextSettings settings;
settings.MajorVersion = 3;
settings.MinorVersion = 2;
sf::Window window(mode, title, style, settings);
-
Hi to all,
I'm new to SFML, but I'm trying it, and is a very nice library.
I need to create an OpenGL 3.2 context (for working with the core specification). I've downloaded and compiled SFML 2.0, but I can't find this class:
sf::ContextSettings settings;
Thanks!
-
Well, it is there.
What does "I can't find this class" mean? Do you have a compile error?
-
What does "I can't find this class" mean? Do you have a compile error?
Yes, 'ContextSetting' is not a member of 'sf'.
Note, I include only Window.hpp.
Thanks.
-
What does "I can't find this class" mean? Do you have a compile error?
Yes, 'ContextSetting' is not a member of 'sf'.
Note, I include only Window.hpp.
Thanks.
The class is sf::ContextSettings, not sf::ContextSetting.
-
The class is sf::ContextSettings, not sf::ContextSetting.
Yes, is my mistake to write to the forum.
But I don't understand where is the problem.
-
Solved :D !
I had downloaded an old (wrong) version of SFML 2.0 :oops: by this link (http://sfml.svn.sourceforge.net/viewvc/sfml/trunk.tar.gz?view=tar).
Sorry :oops:!
-
This is not an old / wrong version, this is the trunk which is the future SFML 1.6. SFML 2 is a separate branch (branches/sfml2), so that I can maintain both at the same time.
-
Yes, it was my mistake, sorry :D.
However thanks for help!