Contraz / demosys-py

A light high performance modern OpenGL 3.3+ Python Framework https://demosys-py.readthedocs.io/
ISC License
64 stars 5 forks source link

Shaders: Supplying preprocessors definitions #39

Closed einarf closed 4 years ago

einarf commented 6 years ago
values = {"VALUE1": 1, "VALUE2": 1}
shaders.load("shader.glsl", preprocessors=values)

.. would insert the following lines in the shader:

#define VALUE1 1
#define VALUE2 1

It should be possible to instantiate the same shader multiple times with different preprocessor values.

einarf commented 4 years ago

We'll support this in moderngl-window