|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.util.ResourceCache
com.threerings.opengl.util.ShaderCache
public class ShaderCache
Caches loaded shaders and shader programs.
| Constructor Summary | |
|---|---|
ShaderCache(GlContext ctx,
boolean checkTimestamps)
Creates a new shader cache. |
|
| Method Summary | |
|---|---|
Program |
getProgram(Shader vertex,
Shader fragment)
Returns an instance of a program with the supplied vertex and fragment shaders. |
Shader |
getShader(String path,
String... defs)
Loads and returns the shader at the specified path with the supplied preprocessor definitions. |
Shader |
getShader(String path,
String[] defs,
String[] ddefs)
Loads and returns the shader at the specified path with the supplied preprocessor definitions as well as a set of derived definitions (not used to find the shader, but included if the shader is compiled). |
String |
getSource(String path)
Retrieves the shader source at the specified path. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShaderCache(GlContext ctx,
boolean checkTimestamps)
checkTimestamps - if true, check the last-modified timestamp of each resource file
when we retrieve it from the cache, reloading the resource if the file has been modified
externally.| Method Detail |
|---|
public Shader getShader(String path,
String... defs)
public Shader getShader(String path,
String[] defs,
String[] ddefs)
public String getSource(String path)
public Program getProgram(Shader vertex,
Shader fragment)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||