skaslev / gl3w

Simple OpenGL core profile loading
http://github.com/skaslev/gl3w
The Unlicense
705 stars 157 forks source link

glCreateBuffers Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) #64

Open plumhly opened 4 years ago

plumhly commented 4 years ago

when I call glCreateBuffers with Xcode on Mac, it send error: Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)

DomAlexRod commented 4 years ago

I have been encountering the same problem.

DomAlexRod commented 4 years ago

Turns out this error occurs as the for OpenGL versions below 4.5 (my MacBook air supports up to 4.1) there is no glCreateBuffers function (hence trying to retrieve this results in a nullptr). Solution is simply to use glGenBuffers instead.