com.threerings.opengl.renderer.config
Class ShaderConfig.Vertex.SourceFile

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.opengl.renderer.config.ShaderConfig.Vertex.Contents
          extended by com.threerings.opengl.renderer.config.ShaderConfig.Vertex.SourceFile
All Implemented Interfaces:
Exportable, Copyable, Cloneable
Enclosing class:
ShaderConfig.Vertex

public static class ShaderConfig.Vertex.SourceFile
extends ShaderConfig.Vertex.Contents

Creates a shader from the specified file.


Field Summary
 ShaderConfig.Definition[] definitions
          The preprocessor definitions to use.
 String file
          The resource from which to load the shader.
 
Constructor Summary
ShaderConfig.Vertex.SourceFile()
           
 
Method Summary
 Shader getShader(GlContext ctx, Scope scope, RenderState[] states, boolean vertexProgramTwoSide)
          Returns the shader.
 void getUpdateResources(HashSet<String> paths)
          Adds the contents' update resources to the provided set.
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

file

@Editable(editor="resource",
          nullable=true)
@FileConstraints(description="m.vertex_shader_files",
                 extensions=".vert",
                 directory="shader_dir")
public String file
The resource from which to load the shader.


definitions

@Editable
public ShaderConfig.Definition[] definitions
The preprocessor definitions to use.

Constructor Detail

ShaderConfig.Vertex.SourceFile

public ShaderConfig.Vertex.SourceFile()
Method Detail

getUpdateResources

public void getUpdateResources(HashSet<String> paths)
Description copied from class: ShaderConfig.Vertex.Contents
Adds the contents' update resources to the provided set.

Overrides:
getUpdateResources in class ShaderConfig.Vertex.Contents

getShader

public Shader getShader(GlContext ctx,
                        Scope scope,
                        RenderState[] states,
                        boolean vertexProgramTwoSide)
Description copied from class: ShaderConfig.Vertex.Contents
Returns the shader.

Specified by:
getShader in class ShaderConfig.Vertex.Contents


Copyright © 2011. All Rights Reserved.