Page MenuHome

Python bgl docs still includes deprecated OpenGL functions
Closed, ResolvedPublic


System Information
Operating system: windows 10 64
Graphics card: ----

Blender Version
2.80 hash: 1b6da95ccb11, data: 2019-01-25

Short description of error
The library is missing glVertex.
Exact steps for others to reproduce the error
import bgl. enter bgl. press ctrl+space

Event Timeline

Vlad (Darcvizer) updated the task description. (Show Details)
Brecht Van Lommel (brecht) renamed this task from The library is missing glVertex. to Python bgl docs still includes deprecated OpenGL functions.
Brecht Van Lommel (brecht) triaged this task as Confirmed, Medium priority.

These functions are no longer available, it is the documentation that needs updating:

@Brecht Van Lommel (brecht), is doc/python_api/rst/bgl.rst all handwritten, or is it generated?

Maybe it was generated at one point, but I can't find anything about that in git history.

You could try auto-generating it from this if it's not too much work to extract the basic descriptions and argument types:

Hmm, I could do it but it does not feel like it is worth it.
Maybe we should just link to and mention how bgl differs from the C functions.
I guess the main difference is that bgl.Buffer has toused as parameter instead of a pointer.

There is great OpenGL documentation out there; I don't think we can do much better than that. By outsourcing this part, we can focus more on creating better examples on how to use the functions in Blender.

That seems fine, I guess we can just link to the OpenGL reference docs for each function.

We should probably link to the official reference rather than

I would be happy to give an example of how to transfer the coordinates of a real object, rather than enter them manually.