Hi, I play with bgl API to try different techniques to render a triangle:
With the help of HG1 I made this:
Working:
- http://www.pasteall.org/blend/42311 (immediate mode)
- http://www.pasteall.org/blend/42312 (immediate mode with glGenList, glNewList, glCallList)
- http://www.pasteall.org/blend/42315 (Vertex arrays with glDrawArrays) Some weird things happen sometimes.
Not working:
- http://www.pasteall.org/blend/42316 (Vertex arrays with glDrawElements)
I’m wondering why the last with glDrawElements is not working. I have no error in the console. If someone (HG1 for example :P) could explain me what is wrong, I thank him very much . Maybe it’s not well supported in bgl or I made a mistake? Thanks!
(I want only to use bgl, not pyOpenGL, to see what we can do with bgl)
(http://www.songho.ca/opengl/gl_vertexarray.html the article I was reading)