Make compatible with OpenGL3+, make legacy code optional
Issue #6
resolved
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)
-
reporter -
reporter - edited description
- changed title to Make compatible with OpenGL3+, make legacy code optional
-
reporter - edited description
-
reporter - edited description
-
reporter - edited description
-
reporter - edited description
-
reporter - changed status to resolved
Done and looks good. New
--legacy
option interacts with--openglContextVersion
allows implementations to be compared. Until extensive tests are donelegacy=True
remains the default option. - Log in to comment
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.