7
$\begingroup$

I am trying to use the bgl module to draw triangles on top of the Blender interface. My understanding is that glBegin/glEnd are deprecated, and vertex array or display list or VBO should be used instead.

But I can't seems to find the relevant functions I need (glDrawArray, glBindBuffer, etc) in the bgl module. Any insights?

my bgl.glGetString(bgl.GL_VERSION) is 2.1 ATI-1.8.18

$\endgroup$
3
  • $\begingroup$ come to think of it, I have never seen anyone with anything other than glBegin etc.. I don't think this has extended to the bgl yet, iirc only a part of ghost has it atm.. not sure.. $\endgroup$
    – iKlsR
    Commented Jun 11, 2013 at 20:59
  • $\begingroup$ I was afraid of that, but thanks for the comment. Btw, do people think questions like this are too specific for this SE? $\endgroup$
    – Mike Pan
    Commented Jun 11, 2013 at 21:02
  • $\begingroup$ Not at all, this is the only legible on-topic question I've seen all day. Also questions like these are bound to show up sooner or later anyways. $\endgroup$
    – iKlsR
    Commented Jun 11, 2013 at 21:09

1 Answer 1

10
$\begingroup$

All the available OpenGL calls exposed in the bgl API are: https://www.blender.org/api/blender_python_api_current/bgl.html

(or in https://svn.blender.org/svnroot/bf-blender/trunk/blender/source/blender/python/generic/bgl.c without the gl prefix)

It has a few OpenGL 2.0 calls, but not even all I think. It's easy to extend it to specific functions, but we are close to the point where it makes more sense to use a full OpenGL wrapper such as PyGL (and that's why the number of functions exposed is a bit stagnated).

$\endgroup$
2
  • $\begingroup$ Thanks Dalai. Good to get an answer from a dev point of view. I will wait a few more days before 'accepting' this answer. $\endgroup$
    – Mike Pan
    Commented Jun 12, 2013 at 3:11
  • 1
    $\begingroup$ Any info on when switching to something like pyopengl might happen ? $\endgroup$ Commented Nov 17, 2014 at 15:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .