#N canvas 998 40 427 171 10;
#X obj 116 89 symbol;
#X obj 116 131 ofelia define -k \$0-GLSL;
#A __set if type(window) ~= "userdata" then \; window = ofWindow()
\; end \; \; local canvas = ofCanvas(this) \; local clock = ofClock(this
\, "setup") \; local shaderDir = canvas:getDir() .. "/data/" \; local
shader = ofShader() \; \; function ofelia.new() \; ofWindow.addListener("setup"
\, this) \; ofWindow.addListener("draw" \, this) \; ofWindow.addListener("exit"
\, this) \; window:setPosition(30 \, 100) \; window:setSize(800 + 40
\, 600 + 40) \; if type(window) ~= "userdata" then \; window = ofWindow()
\; end \; -- window:setGLVersion(3 \, 2) \; window:create() \; if ofWindow.exists
then \; clock:delay(0) \; end \; end \; \; function ofelia.free() \;
window:destroy() \; ofWindow.removeListener("setup" \, this) \; ofWindow.removeListener("draw"
\, this) \; ofWindow.removeListener("exit" \, this) \; end \; \; function
ofelia.setup() \; ofSetWindowTitle("GLSL") \; ofBackground(0 \, 0 \,
0 \, 255) \; end \; \; function ofelia.GLSL(s) \; shader:load(shaderDir
.. s) \; end \; \; function ofelia.draw() \; local time = ofGetElapsedTimef()
\; local resolution = ofGetWindowSize() \; local mouseX = ofGetMouseX()
\; local mouseY = ofGetMouseY() \; shader:beginShader() \; ofSetColor(255)
\; shader:setUniform1f("time" \, time) \; shader:setUniform2f("resolution"
\, resolution) \; shader:setUniform2f("mouse" \, mouseX \, mouseY)
\; shader:setUniform1f("u_time" \, time) \; shader:setUniform2f("u_resolution"
\, resolution) \; shader:setUniform2f("u_mouse" \, mouseX \, mouseY)
\; shader:setUniform1f("iTime" \, time) \; shader:setUniform2f("iResolution"
\, resolution) \; shader:setUniform2f("iMouse" \, mouseX \, mouseY)
\; ofDrawRectangle(20 \, 20 \, 800 \, 600) \; shader:endShader() \;
end \; \; function ofelia.exit() \; shader:unload() \; end \;;
#X msg 116 110 GLSL \$1;
#X msg 116 68 test\$1;
#X obj 116 27 hradio 15 1 1 14 empty empty empty 0 -8 0 10 -204800
-1 -1 8;
#X obj 116 47 + 1;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X connect 3 0 0 0;
#X connect 4 0 5 0;
#X connect 5 0 3 0;
