PrOGL
processing open-gl interface
Loading...
Searching...
No Matches
PrOGL.pde
Go to the documentation of this file.
1// progl.pde
2// samantha jane
3// processing glsl interface
4//------------------------------------------------------------------------------
5
6/** global renderer object that renders to the entire size of the screen */
8
9/**
10* setup is in charge of creating the window and initializing a Renderer object,
11* along with any uniforms our shader requires.
12*/
13void setup() {
14 size(800, 800, P2D);
15 // set custom uniforms as follows
16 Uniform tex = new Uniform(
17 "tex",
18 new Texture("texture.jpg"),
20 );
21
22 // set renderer
23 r = new Renderer("frag.glsl", width, height, tex);
24}
25
26/**
27* draw continuously calls render every frame,
28* updating uniform values and progressing the shader.
29*/
30void draw() {
31 r.render();
32}
Renderer r
global renderer object that renders to the entire size of the screen
Definition PrOGL.pde:7
void setup()
setup is in charge of creating the window and initializing a Renderer object, along with any uniforms...
Definition PrOGL.pde:13
void draw()
draw continuously calls render every frame, updating uniform values and progressing the shader.
Definition PrOGL.pde:30
PrOGL renderer.
Definition Renderer.pde:10
void render()
renders the shader and then draws it to the surface.
Definition Renderer.pde:72
the Texture class serves a wrapper for a PImage and image path.
Definition Texture.pde:9
organizes information for a single Uniform, including its underlying data type and update behavior.
Definition Uniform.pde:27
interface to store lambda expression.
Definition Uniform.pde:10
TEXTURE
2D texture
Definition Uniform.pde:17