com.threerings.opengl.renderer.config
Class ShaderConfig.ArrayRefUniformConfig<T>

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.opengl.renderer.config.ShaderConfig.UniformConfig
          extended by com.threerings.opengl.renderer.config.ShaderConfig.ArrayRefUniformConfig<T>
All Implemented Interfaces:
Exportable, Copyable, Cloneable
Direct Known Subclasses:
ShaderConfig.MatrixArrayRefUniformConfig
Enclosing class:
ShaderConfig

public abstract static class ShaderConfig.ArrayRefUniformConfig<T>
extends ShaderConfig.UniformConfig

Base class for configs representing uniform arrays whose values come from references to scoped variables.


Field Summary
 
Fields inherited from class com.threerings.opengl.renderer.config.ShaderConfig.UniformConfig
name
 
Constructor Summary
ShaderConfig.ArrayRefUniformConfig()
           
 
Method Summary
protected abstract  Program.Uniform createUniform(int location, T value)
          Creates a uniform object from this configuration.
 void createUniforms(Scope scope, Program program, List<Program.Uniform> uniforms, List<Updater> updaters)
          Creates the uniform objects for this config and adds them to the provided list.
protected abstract  Class<? extends T[]> getArrayClass()
          Returns the array class that we're expecting.
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShaderConfig.ArrayRefUniformConfig

public ShaderConfig.ArrayRefUniformConfig()
Method Detail

createUniforms

public void createUniforms(Scope scope,
                           Program program,
                           List<Program.Uniform> uniforms,
                           List<Updater> updaters)
Description copied from class: ShaderConfig.UniformConfig
Creates the uniform objects for this config and adds them to the provided list.

Specified by:
createUniforms in class ShaderConfig.UniformConfig

getArrayClass

protected abstract Class<? extends T[]> getArrayClass()
Returns the array class that we're expecting.


createUniform

protected abstract Program.Uniform createUniform(int location,
                                                 T value)
Creates a uniform object from this configuration.

Parameters:
location - the location of the uniform.
value - a reference to the value of the uniform.