SFML community forums

Help => Graphics => Topic started by: slimmeke on September 09, 2013, 08:08:44 am

Title: Opengl Buffer problem
Post by: slimmeke on September 09, 2013, 08:08:44 am
Hey guys

I have a problem using Opengl buffers with SFML.
I do not know if that is a SFML problem or an Opengl problem.
You can find source and images at:
http://stackoverflow.com/questions/18673603/screen-corruption-when-using-opengl-buffers (http://stackoverflow.com/questions/18673603/screen-corruption-when-using-opengl-buffers)

Hope someone can help me with it.
Title: Re: Opengl Buffer problem
Post by: Laurent on September 09, 2013, 08:17:16 am
You must disable all your buffers before drawing with SFML.
Title: Re: Opengl Buffer problem
Post by: slimmeke on September 09, 2013, 08:52:28 am
Tnx Laurent.

Sorry for asking is it possible to give me some example code?
I do not know a lot about Opengl buffers yet.
Title: Re: Opengl Buffer problem
Post by: binary1248 on September 09, 2013, 09:15:09 am
If you mean examples regarding OpenGL buffer objects in general:

http://www.opengl.org/wiki/Buffer_Object
http://www.opengl.org/wiki/VBO_-_just_examples
http://www.songho.ca/opengl/gl_vbo.html
http://nehe.gamedev.net/tutorial/vertex_buffer_objects/22002/
http://lmgtfy.com/?q=OpenGL+VBO

If you mean interaction between SFML and OpenGL buffer objects, there are none.
The closest there is is the tutorial page on using sfml-graphics side by side with OpenGL. The rest you have to figure out by yourself.

http://sfml-dev.org/tutorials/2.1/window-opengl.php