Maven module :un.engine : engine-opengl :
Class : un.engine.opengl.renderer.actor.ActorProgram
Extends/Implements : un.impl.opengl.resource.AbstractResource
Subclasses : -

author  Johann Sorel


Variables : transformFeedBackVars, transformFeedBackMode, actors
Functions : ActorProgram, getExecutor, setExecutor, getActors, getTransformFeedBackVars, getTransformFeedBackMode, render, setTransformFeedBackMode, compile, preExecutionGL, preDrawGL, postDrawGL, releaseProgram, buildShaderCode, getGpuID, usesTesselationShader, usesGeometryShader, getUniform, getUniform, getVertexAttribute, getVertexAttribute, isOnSystemMemory, isOnGpuMemory, loadOnSystemMemory, loadOnGpuMemory, unloadFromSystemMemory, unloadFromGpuMemory, enable, disable, buildReuseID


protected Sequence transformFeedBackVars

protected int transformFeedBackMode

protected Sequence actors


public void ActorProgram ()

public ActorExecutor getExecutor ()

public void setExecutor (ActorExecutor executor)

public Sequence getActors ()

public Sequence getTransformFeedBackVars ()

public int getTransformFeedBackMode ()

public void render (RenderContext context, CameraMono camera, GLNode node)


One of GLC.TRANSFORM_FEEDBACK
param  transformFeedBackMode
public void setTransformFeedBackMode (int transformFeedBackMode)


Merge and compile the shader parts of each actors in a shader program.
param  context
public void compile (RenderContext context)


Loop on actors to call 'preExecutionGL'.
public void preExecutionGL (RenderContext context, Object candidate)


Enables program and loop on actors to call 'preDrawGL'.
public void preDrawGL (RenderContext context)


Disable program and loop on actors to call 'postDrawGL'.
public void postDrawGL (RenderContext context)

public void releaseProgram (GLProcessContext context)


Build the GLSL text code from actors.
param  ctx
return  Chars[5] {vertex, tesseControl, tessEval, geom, fragment}
public Chars[] buildShaderCode (RenderContext ctx)


Get shader program id.
return  shader program id
public int getGpuID ()


Indicate if this program uses the tesselation phases.
return  true if tesselation is present.
public boolean usesTesselationShader ()


Indicate if this program uses the geometry phase.
return  true if geometry is present.
public boolean usesGeometryShader ()

public Uniform getUniform (Chars name)

public Uniform getUniform (Chars name, GL gl, int type)

public VertexAttribute getVertexAttribute (Chars name, GL gl)

public VertexAttribute getVertexAttribute (Chars name, GL gl, int slotsize)


{@inheritDoc }
public boolean isOnSystemMemory ()


{@inheritDoc }
public boolean isOnGpuMemory ()


{@inheritDoc }
public void loadOnSystemMemory (GL gl)


{@inheritDoc }
public void loadOnGpuMemory (GL gl)


{@inheritDoc }
public void unloadFromSystemMemory (GL gl)


{@inheritDoc }
public void unloadFromGpuMemory (GL gl)


Activate the program.
OpenGL constraints : GL2ES2
param  gl
public void enable (GL gl)


Desactivate the program.
OpenGL constraints : GL2ES2
param  gl
public void disable (GL gl)

public Chars buildReuseID (GL gl)