Skip to content

Experimental Auto-Generated Python Bindings for OpenGL

License

Notifications You must be signed in to change notification settings

jr-garcia/Glaze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glaze

Experimental Auto-Generated Python bindings for OpenGL, created with Cython and Glad

Status

Works with Glad's default loader.

  • The GL binding (glaze.GL) generates and compiles.

  • Some platform-specific typedefs are ommited, along with the functions that use them.

  • Other bindings such as GLX or EGL are generated partially. Might compile (untested).

Glaze Demos

Setup

First run:

python setup.py regen --help

for a list of parameters. Then run:

python setup.py install

The simplest commands to generate and test the GL binding would be:

python setup.py regen --api=gl
python setup.py develop

Check the demos for code differences with PyOpenGL.

The function 'glaze.GL.loadGL()' needs to be called before any gl* command and after a valid context has been created.

FAQ

Q: Does this intend to replace PyopenGL?

a: No.

Q: Who is the target audience for this project?

a: People who is starting an OpenGL project with Python and plans to switch to Cython eventually to achieve maximum performance.

Notes:

I have not seen any performance gain when using Glaze over PyopenGL, despite removing some type checks and using 'Nogil' in the code.

About

Experimental Auto-Generated Python Bindings for OpenGL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published