Make compatible with OpenGL3+, make legacy code optional

Issue #6 resolved
Jeremy Hill created an issue

Shady currently works best on (Windows) systems that allow legacy and modern features to be mixed. In legacy-only OpenGL (e.g. the default context on macOS) it also works but random-number generation is poorer. We need to create a modern-OpenGL-only mode, both for improved functionality on macOS and for forward compatibility:

  • update shader code (done)
  • remove reliance on fixed-function pipeline and matrix stacks, i.e. glMatrixMode..... glTranslate.... glRotate...., (done)
  • provide VBO/VAO alternative to immediate-mode drawing commands glBegin... glVertex... glEnd, (partially done: moderngl branch only, PyEngine only)

Tests:

  • Python 2, Python 3
  • Test unaccelerated backend with pyglet.GL as well as OpenGL.GL
  • bare (without numpy and friends)

Comments (7)

  1. Jeremy Hill reporter

    Also drop pyglet support unless/until pyglet can create 3.3 contexts (see scraps/pyglet_opengl3_attempt.py). Note that there is a Python package that binds to GLFW.

  2. Jeremy Hill reporter

    Done and looks good. New --legacy option interacts with --openglContextVersion allows implementations to be compared. Until extensive tests are done legacy=True remains the default option.

  3. Log in to comment