SFML community forums

Help => Window => Topic started by: _doodle_ on December 30, 2012, 03:55:01 pm

Title: [SFML2.0] OGL3.3 and RenderWindow
Post by: _doodle_ on December 30, 2012, 03:55:01 pm
hi, i have one question : i want to use both of them (ogl & renderwindow) to render on the screen but seems like one of them doesn't work when the other is used as a renderer(main context?). OGL itself renders fine but when it comes to switching between the roles the app crashes . In the related tutorials for the use of ogl & renderwindow together 2.1- versions of gl are considered . so how to solve this? thanks
Title: Re: [SFML2.0] OGL3.3 and RenderWindow
Post by: Weeve on January 08, 2013, 05:23:30 pm
SFML contains support for OpenGL inside of it, I would not be surprised if you were manually including OpenGL files into your project that conflicted with SFML, if you are not, then check that you have the max frame rate set low enough so that OpenGL dosn't flood your processor, if that is not it, check that your are calling sf::Window.Display() and glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); to first of all, display the screen, and second, to clear the buffer, or else OpenGL will be overwriting what was already written, if you did that correctly, and its still wrong, Email me at WeeveFerrelaine@yahoo.com, and I will Email you back with my project that currently implements OpenGL in SFML.  8)