|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.loaders.shaders.base.ShaderLoader<T>
public abstract class ShaderLoader<T extends Shader>
Loader base for Shader loaders.
| Constructor Summary | |
|---|---|
protected |
ShaderLoader()
|
protected |
ShaderLoader(java.lang.String basePath)
|
protected |
ShaderLoader(java.net.URL baseURL)
|
| Method Summary | |
|---|---|
protected void |
cacheShader(java.lang.String cacheTag,
T shader)
Stores the Shader into the cache by the given tag. |
java.lang.String |
getBasePath()
|
java.net.URL |
getBaseURL()
|
protected T |
getFromCache(java.lang.String cacheTag)
Retrieves the Shader from the cache, or null, if the Shader was not cached. |
abstract T |
loadShader(java.io.InputStream in,
Shader.ShaderType type)
Retrives the Shader from the given InputStream. |
abstract T |
loadShader(java.io.Reader reader,
Shader.ShaderType type)
Retrives the Shader from the given reader. |
abstract T |
loadShader(java.lang.String name,
Shader.ShaderType type)
Retrives the Shader with the given name. |
abstract T |
loadShader(java.net.URL url,
Shader.ShaderType type)
Retrives the Shader from the given URL. |
abstract T |
loadShaderFromString(java.lang.String source,
Shader.ShaderType typ)
Creates a Shader from the given String. |
protected void |
popBasePath()
|
protected void |
popBaseURL()
|
void |
setBasePath(java.lang.String pathName)
This method sets the base path name for data files associated with the file. |
protected boolean |
setBasePathFromShaderFile(java.lang.String shaderFilename)
|
void |
setBaseURL(java.net.URL url)
This method sets the base URL name for data files associated with the file. |
protected boolean |
setBaseURLFromShaderURL(java.net.URL shaderURL)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ShaderLoader()
protected ShaderLoader(java.net.URL baseURL)
protected ShaderLoader(java.lang.String basePath)
| Method Detail |
|---|
public void setBaseURL(java.net.URL url)
protected void popBaseURL()
public java.net.URL getBaseURL()
public void setBasePath(java.lang.String pathName)
protected void popBasePath()
public java.lang.String getBasePath()
protected boolean setBaseURLFromShaderURL(java.net.URL shaderURL)
throws java.net.MalformedURLException
java.net.MalformedURLExceptionprotected boolean setBasePathFromShaderFile(java.lang.String shaderFilename)
protected T getFromCache(java.lang.String cacheTag)
cacheTag - the tag to search the cache for
protected void cacheShader(java.lang.String cacheTag,
T shader)
cacheTag - the tag to assotiate the Shader within the cache
public abstract T loadShader(java.io.Reader reader,
Shader.ShaderType type)
throws java.io.IOException
reader - the reader to load the Shader fromtype - the desired Shader type
java.io.IOException
public abstract T loadShader(java.io.InputStream in,
Shader.ShaderType type)
throws java.io.IOException
in - the InputStream to load the Shader fromtype - the desired Shader type
java.io.IOException
public abstract T loadShader(java.net.URL url,
Shader.ShaderType type)
throws java.io.IOException
url - the URL to load the Shader fromtype - the desired Shader type
java.io.IOException
public abstract T loadShader(java.lang.String name,
Shader.ShaderType type)
throws java.io.IOException
name - The name of the Shadertype - The desired Shader type
java.io.IOException
public abstract T loadShaderFromString(java.lang.String source,
Shader.ShaderType typ)
source - The String that should get parsed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||