PrOGL
processing open-gl interface
Loading...
Searching...
No Matches
Renderer Class Reference

PrOGL renderer. More...

Collaboration diagram for Renderer:

Package Functions

 Renderer (String path, int w, int h)
 Renderer Constructor without Uniforms.
 
 Renderer (String path, int w, int h, Uniform uniform)
 Renderer Constructor with Uniform.
 
 Renderer (String path, int w, int h, ArrayList< Uniform > uniforms)
 Renderer Constructor with Uniforms.
 
void render ()
 renders the shader and then draws it to the surface.
 
void update ()
 attempts to update all updatable internal Uniforms.
 
void print ()
 print Renderer class data for debugging purposes.
 

Package Attributes

Shader sh
 shader object
 
PGraphics surface
 surface to render to
 
PVector pos
 position within the window
 
int w
 width to render the surface as
 
int h
 height to render the surface as
 

Detailed Description

PrOGL renderer.

A self contained surface renderer.

Definition at line 10 of file Renderer.pde.

Constructor & Destructor Documentation

◆ Renderer() [1/3]

Renderer.Renderer ( String  path,
int  w,
int  h 
)
package

Renderer Constructor without Uniforms.

This constructs the internal Shader object with only the default uniforms time, resolution, and mouse.

Parameters
pathrelative path to shader file
wwidth of surface in pixels
hheight of surface in pixels

Definition at line 27 of file Renderer.pde.

References h, and w.

◆ Renderer() [2/3]

Renderer.Renderer ( String  path,
int  w,
int  h,
Uniform  uniform 
)
package

Renderer Constructor with Uniform.

This constructs the internal Shader object with the default uniforms along with whatever we add.

Parameters
pathrelative path to shader file
wwidth of surface in pixels
hheight of surface in pixels
uniformuniform object to initialize with shader

Definition at line 44 of file Renderer.pde.

References h, and w.

◆ Renderer() [3/3]

Renderer.Renderer ( String  path,
int  w,
int  h,
ArrayList< Uniform uniforms 
)
package

Renderer Constructor with Uniforms.

This constructs the internal Shader object with default uniforms and a list of other user defined Uniforms.

Parameters
pathrelative path to shader file
wwidth of surface in pixels
hheight of surface in pixels
uniformsan ArrayList of uniform objects to initialize

Definition at line 61 of file Renderer.pde.

References h, and w.

Member Function Documentation

◆ print()

void Renderer.print ( )
package

print Renderer class data for debugging purposes.

Definition at line 91 of file Renderer.pde.

References h, pos, sh, surface, and w.

◆ render()

void Renderer.render ( )
package

renders the shader and then draws it to the surface.

Definition at line 72 of file Renderer.pde.

References pos, Shader.program, sh, surface, and update().

Here is the call graph for this function:

◆ update()

void Renderer.update ( )
package

attempts to update all updatable internal Uniforms.

Definition at line 84 of file Renderer.pde.

References sh, and Shader.update_uniforms().

Here is the call graph for this function:

Member Data Documentation

◆ h

int Renderer.h
package

height to render the surface as

Definition at line 16 of file Renderer.pde.

◆ pos

PVector Renderer.pos
package

position within the window

Definition at line 14 of file Renderer.pde.

◆ sh

Shader Renderer.sh
package

shader object

Definition at line 12 of file Renderer.pde.

◆ surface

PGraphics Renderer.surface
package

surface to render to

Definition at line 13 of file Renderer.pde.

◆ w

int Renderer.w
package

width to render the surface as

Definition at line 15 of file Renderer.pde.


The documentation for this class was generated from the following file: