Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: glDrawArrays crash  (Read 1631 times)

0 Members and 1 Guest are viewing this topic.

Neomex

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Email
glDrawArrays crash
« 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.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: glDrawArrays crash
« Reply #1 on: October 14, 2015, 09:34:32 am »
Please provide a minimal complete example. 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.
« Last Edit: October 14, 2015, 09:36:23 am by Nexus »
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

GraphicsWhale

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: glDrawArrays crash
« Reply #2 on: October 14, 2015, 12:08:10 pm »
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

 

anything