Skip to content

amiller/glxcontext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Andrew Miller <amiller@dappervision.com>


If you need an OpenGL context for offscreen rendering, and don't
want to create a Wx or GTK window, this is the easiest way to do it.

Even on a headless machine (like a virtualbox), you can install
xvfb-run and use it with this package.

Normal cautions about OpenGL still apply, play it safe and do your
OpenGL things on the system main thread.


Requirements:
   libx11-dev
   Cython


Usage:
   import glxcontext
   from OpenGL.GL import glGetString, GL_VERSION

   glxcontext.makecurrent()
   print glGetString(GL_VERSION)

   # Now you can use OpenGL functions, for example creating an offscreen buffer
   # See tests/test_offscreen.py

   

About

Gets you an OpenGL context for offscreen rendering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published