glDrawElements with bgl

Hi, I play with bgl API to try different techniques to render a triangle:

With the help of HG1 I made this:


Not working:

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 :slight_smile: . 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)

( the article I was reading)

This is interresting to know what we can do with bgl but I can’t help with the glDrawElements…

(I must say that I prefer pyOpenGL because it solve some limits of bgl and sometimes it seems like pyOpenGL is easier to use (in my opinion). But on the other side bgl is comfortable because it’s an build in library.)

@Maujoe: Thanks!

for glDrawElements, it’s fixed:

I don’t know why glDrawElements wants unsigned bytes. Cool :slight_smile: