Thanks to work by
Ralf Biedert processing.py has recently been update to use jython-2.7b1 and processing-2.0b8. It might be interesting to follow his fork in the meantime it has been pulled into the original by Jonathan Feinberg. So you can even update it yourself to the development version of vanilla processing if you wish (strange thing is why opengl is still kept in libraries folder instead of alongside core as P2D and P3D are both rendered using opengl). Here is another Shader example translated to processing.py.
1 monjori = None
2
3 def setup():
4 size(640, 360, P2D)
5 noStroke()
6 global monjori
7 monjori = loadShader("monjori.glsl")
8 monjori.set("resolution", float(width), float(height))
9
10
11 def draw():
12 monjori.set("time", millis() / 1000.0)
13 shader(monjori)
14
15
16
17 fill(0)
18 rect(0, 0, width, height)
No comments:
Post a Comment