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 */
7
Renderer
r
;
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
*/
13
void
setup
() {
14
size(800, 800, P2D);
15
// set custom uniforms as follows
16
Uniform
tex =
new
Uniform
(
17
"tex"
,
18
new
Texture
(
"texture.jpg"
),
19
uniform_type
.
TEXTURE
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
*/
30
void
draw
() {
31
r
.
render
();
32
}
r
Renderer r
global renderer object that renders to the entire size of the screen
Definition
PrOGL.pde:7
setup
void setup()
setup is in charge of creating the window and initializing a Renderer object, along with any uniforms...
Definition
PrOGL.pde:13
draw
void draw()
draw continuously calls render every frame, updating uniform values and progressing the shader.
Definition
PrOGL.pde:30
Renderer
PrOGL renderer.
Definition
Renderer.pde:10
Renderer.render
void render()
renders the shader and then draws it to the surface.
Definition
Renderer.pde:72
Texture
the Texture class serves a wrapper for a PImage and image path.
Definition
Texture.pde:9
Uniform
organizes information for a single Uniform, including its underlying data type and update behavior.
Definition
Uniform.pde:27
uniform_type
interface to store lambda expression.
Definition
Uniform.pde:10
uniform_type.TEXTURE
TEXTURE
2D texture
Definition
Uniform.pde:17
PrOGL.pde
Generated by
1.9.8