|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.loaders.shaders.base.ShaderLoader<GLSLShader>
org.xith3d.loaders.shaders.impl.glsl.GLSLShaderLoader
public class GLSLShaderLoader
Loads a GLSL shaders.
| Nested Class Summary | |
|---|---|
static class |
GLSLShaderLoader.InlineVariableMapping
This defines a mapping for placeholders in a shader source, that are replaced by the provided values. |
| Constructor Summary | |
|---|---|
GLSLShaderLoader()
Constructs a Loader with default values for all variables. |
|
GLSLShaderLoader(java.lang.String basePath)
Constructs a Loader with the specified basePath. |
|
GLSLShaderLoader(java.net.URL baseURL)
Constructs a Loader with the specified baseURL. |
|
| Method Summary | |
|---|---|
static GLSLShaderLoader |
getInstance()
|
GLSLFragmentShader |
loadFragmentShader(java.lang.String name)
Retrives the Shader with the given name. |
GLSLFragmentShader |
loadFragmentShader(java.net.URL url)
Retrives the Shader with the given name. |
GLSLFragmentShader |
loadFragmentShader(java.net.URL url,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
Retrives the Shader with the given name. |
GLSLFragmentShader |
loadFragmentShaderFromString(java.lang.String source)
Creates a Shader from the given String. |
GLSLFragmentShader |
loadFragmentShaderFromString(java.lang.String source,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
Creates a Shader from the given String. |
GLSLShader |
loadShader(java.io.InputStream in,
Shader.ShaderType type)
Retrives the Shader from the given InputStream. |
GLSLShader |
loadShader(java.io.InputStream in,
Shader.ShaderType type,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
|
GLSLShader |
loadShader(java.io.Reader reader,
Shader.ShaderType type)
Retrives the Shader from the given reader. |
GLSLShader |
loadShader(java.io.Reader reader,
Shader.ShaderType type,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
|
GLSLShader |
loadShader(java.lang.String name,
Shader.ShaderType type)
Retrives the Shader with the given name. |
GLSLShader |
loadShader(java.net.URL url,
Shader.ShaderType type)
Retrives the Shader from the given URL. |
GLSLShader |
loadShader(java.net.URL url,
Shader.ShaderType type,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
|
GLSLShader |
loadShaderFromString(java.lang.String source,
Shader.ShaderType typ)
Creates a Shader from the given String. |
GLSLShader |
loadShaderFromString(java.lang.String source,
Shader.ShaderType typ,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
|
GLSLVertexShader |
loadVertexShader(java.lang.String name)
Retrives the Shader with the given name. |
GLSLVertexShader |
loadVertexShader(java.net.URL url)
Retrives the Shader with the given name. |
GLSLVertexShader |
loadVertexShader(java.net.URL url,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
Retrives the Shader with the given name. |
GLSLVertexShader |
loadVertexShaderFromString(java.lang.String source)
Creates a Shader from the given String. |
GLSLVertexShader |
loadVertexShaderFromString(java.lang.String source,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
Creates a Shader from the given String. |
| Methods inherited from class org.xith3d.loaders.shaders.base.ShaderLoader |
|---|
cacheShader, getBasePath, getBaseURL, getFromCache, popBasePath, popBaseURL, setBasePath, setBasePathFromShaderFile, setBaseURL, setBaseURLFromShaderURL |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GLSLShaderLoader(java.net.URL baseURL)
baseURL - the new baseURL to take resources frompublic GLSLShaderLoader(java.lang.String basePath)
basePath - the new basePath to take resources frompublic GLSLShaderLoader()
| Method Detail |
|---|
public GLSLShader loadShader(java.io.Reader reader,
Shader.ShaderType type,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
public GLSLShader loadShader(java.io.Reader reader,
Shader.ShaderType type)
throws java.io.IOException
loadShader in class ShaderLoader<GLSLShader>reader - the reader to load the Shader fromtype - the desired Shader type
java.io.IOException
public GLSLShader loadShader(java.io.InputStream in,
Shader.ShaderType type,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
public GLSLShader loadShader(java.io.InputStream in,
Shader.ShaderType type)
throws java.io.IOException
loadShader in class ShaderLoader<GLSLShader>in - the InputStream to load the Shader fromtype - the desired Shader type
java.io.IOException
public GLSLShader loadShader(java.net.URL url,
Shader.ShaderType type,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
throws java.io.IOException
java.io.IOException
public GLSLShader loadShader(java.net.URL url,
Shader.ShaderType type)
throws java.io.IOException
loadShader in class ShaderLoader<GLSLShader>url - the URL to load the Shader fromtype - the desired Shader type
java.io.IOException
public GLSLShader loadShader(java.lang.String name,
Shader.ShaderType type)
throws java.io.IOException
loadShader in class ShaderLoader<GLSLShader>name - The name of the Shadertype - The desired Shader type
java.io.IOException
public GLSLVertexShader loadVertexShader(java.net.URL url,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
throws java.io.IOException
url - The url of the Shader.
java.io.IOException
public GLSLVertexShader loadVertexShader(java.net.URL url)
throws java.io.IOException
url - The url of the Shader.
java.io.IOException
public GLSLVertexShader loadVertexShader(java.lang.String name)
throws java.io.IOException
name - The name of the Shader.
java.io.IOException
public GLSLFragmentShader loadFragmentShader(java.net.URL url,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
throws java.io.IOException
url - The url of the Shader.
java.io.IOException
public GLSLFragmentShader loadFragmentShader(java.net.URL url)
throws java.io.IOException
url - The url of the Shader.
java.io.IOException
public GLSLFragmentShader loadFragmentShader(java.lang.String name)
throws java.io.IOException
name - The name of the Shader.
java.io.IOException
public GLSLShader loadShaderFromString(java.lang.String source,
Shader.ShaderType typ,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
public GLSLShader loadShaderFromString(java.lang.String source,
Shader.ShaderType typ)
loadShaderFromString in class ShaderLoader<GLSLShader>source - The String that should get parsed
public GLSLVertexShader loadVertexShaderFromString(java.lang.String source,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
source - The String that should get parsed
public GLSLVertexShader loadVertexShaderFromString(java.lang.String source)
source - The String that should get parsed
public GLSLFragmentShader loadFragmentShaderFromString(java.lang.String source,
GLSLShaderLoader.InlineVariableMapping... inlineVariables)
source - The String that should get parsed
public GLSLFragmentShader loadFragmentShaderFromString(java.lang.String source)
source - The String that should get parsed
public static GLSLShaderLoader getInstance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||