Maven module :un.engine : engine-opengl :
Class : un.engine.opengl.renderer.actor.Actor
Extends/Implements : -
Subclasses : -

A shader actor is an object acting is the rendering process. It it taking
part in the shader construction process and rendering.
author  Johann Sorel


Variables : INDATA, OUTDATA, CV_WORK_VERTEX_MODEL, CV_VERTEX_MODEL, CV_VERTEX_WORLD, CV_VERTEX_CAMERA, CV_VERTEX_PROJ, CV_NORMAL_MODEL, CV_NORMAL_WORLD, CV_NORMAL_CAMERA, CV_NORMAL_PROJ, CV_UV, CV_TANGENT_MODEL, CV_TANGENT_WORLD, CV_TANGENT_CAMERA, CV_TANGENT_PROJ
Functions : getReuseUID, getMinGLSLVersion, isDirty, usesTesselationShader, usesGeometryShader, initProgram, preExecutionGL, preDrawGL, postDrawGL, dispose




public Chars INDATA

public Chars OUTDATA

public Chars CV_WORK_VERTEX_MODEL

public Chars CV_VERTEX_MODEL

public Chars CV_VERTEX_WORLD

public Chars CV_VERTEX_CAMERA

public Chars CV_VERTEX_PROJ

public Chars CV_NORMAL_MODEL

public Chars CV_NORMAL_WORLD

public Chars CV_NORMAL_CAMERA

public Chars CV_NORMAL_PROJ

public Chars CV_UV

public Chars CV_TANGENT_MODEL

public Chars CV_TANGENT_WORLD

public Chars CV_TANGENT_CAMERA

public Chars CV_TANGENT_PROJ



Shader actor GLSL program parts can often be reused by multiple
meshes. this method provide a way to identify such shader actors
to allow reusing shader programs (associations of compiled shader actors).
return  unique id or null if it can not be reused
Chars getReuseUID ()


Get the minimum GLSL version this actor needs.
Value is expected to be the same as the first line in a GLSL program.
Example : #110, #300, #400
return  minimum required version of GLSL
int getMinGLSLVersion ()


Indicate if the actor needs to update it's resources.
return  true if is dirty.
boolean isDirty ()


Indicate if this actor will use tessalation shaders.
return  true if uses tesselation.
boolean usesTesselationShader ()


Indicate if this actor will use geometry shader.
return  true if uses geometry shader.
boolean usesGeometryShader ()


Called to initialize the shader program.
param  context
param  template
param  tess
param  geom
void initProgram (RenderContext context, ShaderProgramTemplate template, boolean tess, boolean geom)


Called before the program is enabled.
param  context
param  candidate
void preExecutionGL (RenderContext context, Object candidate)


Called before rendering the mesh.
The program is already enabled at this state.
Appropriate time to bind resources.
param  context
param  program
void preDrawGL (RenderContext context, ActorProgram program)


Called after rendering the mesh.
Appropriate time to unbind resources.
param  context
param  program
void postDrawGL (RenderContext context, ActorProgram program)


Clear used resources on the gpu.
param  context
void dispose (GLProcessContext context)