开发者

GLEW segfault with functions of gl 2.0 and +?

I'm cu开发者_如何学JAVArrently struggling with a segfault I get using GLEW. I've tried a few functions (glUseProgram, glBindVertexArray) and they cause a segfault. What's weird is if I fetch the function pointer myself with wglGetProcAddress(), it works. But I don't plan on doing that for every function.

Anyone seen this problem before?


try adding

glewExperimental = GL_TRUE;

right above your call to glewInit. Although I don't know what it means, it fixed it for me.


Did you forget to call glewInit(), perhaps? Otherwise, did you check whether the function(s) you're using are supported, using glewIsSupported? If you can get the function yourself, it should be supported though, presuming you did the initialization correctly.


You might try GLee instead of GLEW. GLee loads faster and initializes automatically. It had fallen behind OpenGL a couple releases, but I worked with the author and got it up-to-date recently.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜