29 this.surface = createGraphics(
w,
h, P2D);
30 this.pos =
new PVector(0, 0);
45 this.sh =
new Shader(path,
w,
h, uniform);
46 this.surface = createGraphics(
w,
h, P2D);
47 this.pos =
new PVector(0, 0);
61 Renderer(String path,
int w,
int h, ArrayList<Uniform> uniforms) {
62 this.sh =
new Shader(path,
w,
h, uniforms);
63 this.surface = createGraphics(
w,
h, P2D);
64 this.pos =
new PVector(0, 0);
93 println(
"- shader : " +
sh);
94 println(
"- surface : " +
surface);
95 println(
"- dim(w,h) : " +
w +
", " +
h);
96 println(
"- pos(x,y) : " +
pos.x +
", " +
pos.y);
97 println(
"----------------");
PGraphics surface
surface to render to
Renderer(String path, int w, int h, ArrayList< Uniform > uniforms)
Renderer Constructor with Uniforms.
PVector pos
position within the window
Renderer(String path, int w, int h, Uniform uniform)
Renderer Constructor with Uniform.
int h
height to render the surface as
void update()
attempts to update all updatable internal Uniforms.
int w
width to render the surface as
Renderer(String path, int w, int h)
Renderer Constructor without Uniforms.
void render()
renders the shader and then draws it to the surface.
void print()
print Renderer class data for debugging purposes.
Shader object organizes a list of uniforms and a compiled PShader.
void update_uniforms()
update uniforms with an update function.
PShader program
OpenGL program binding.