SFML community forums
Help => General => Topic started by: Neomex on October 13, 2015, 04:38:18 pm
-
My application keeps crashing with unhandled exception when I add glDrawArrays.
I have tried to glDisableClientState but it doesn't help
http://pastebin.com/GN5nxCwF
Is it something to do with SFML? I'm nearly sure OpenGL code is correct.
-
Please provide a minimal complete example (http://en.sfml-dev.org/forums/index.php?topic=5559.msg36368#msg36368). Post it here, not on an external site. And describe the error more precisely.
If your question is more related to OpenGL than SFML, you will get better answers on a different forum or platform. In general, you should track OpenGL errors, see SFML's implementation of the glCheck macro.
-
What was the exception being thrown?
I have tried to glDisableClientState but it doesn't help
What version of OpenGL are you trying to target? That function only works with legacy OpenGL (as in functions like glVertexAttribPointer cannot work with glEnableClientState as they're part of two entirely different ways of drawing).
By the way, there's a forum on the official OpenGL website for beginners: https://www.opengl.org/discussion_boards/forumdisplay.php/6-OpenGL-coding-beginners (https://www.opengl.org/discussion_boards/forumdisplay.php/6-OpenGL-coding-beginners)