com.threerings.opengl.renderer
Class Shader

java.lang.Object
  extended by com.threerings.opengl.renderer.ShaderObject
      extended by com.threerings.opengl.renderer.Shader

public class Shader
extends ShaderObject

Contains a shader.


Constructor Summary
Shader(Renderer renderer, int type)
          Creates a new shader.
 
Method Summary
 boolean setSource(String source)
          Sets the source to the shader and compiles it.
 
Methods inherited from class com.threerings.opengl.renderer.ShaderObject
delete, getId, getInfoLog
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Shader

public Shader(Renderer renderer,
              int type)
Creates a new shader.

Method Detail

setSource

public boolean setSource(String source)
Sets the source to the shader and compiles it. If compilation fails (or even if it succeeds), ShaderObject.getInfoLog() can be used to return more information.

Returns:
true if the shader compiled successfully, false if there was an error.


Copyright © 2011. All Rights Reserved.