com.threed.jpct
Class ShaderLocator
java.lang.Object
com.threed.jpct.ShaderLocator
public class ShaderLocator
- extends java.lang.Object
This is important for OpenGL ES 2.0 support only. If you aren't using this,
ignore this class.
The default shaders that jPCT-AE uses are stored in the jpct-ae.jar. By
default, they will be accessed from there or to be more precise, from the
root directory of the APK. However, not all ways to create an APK pay
attention to additional files in the jar and in that case, jPCT-AE can't find
it's shaders. If this happens to you, you can use the jpct_shaders.zip that
comes with the distribution and store it either in the res/raw- or in the
assets-directory of your project. You then have to create a new ShaderLocator
that reflects your choice and set it into the GLSLShader class before
instantiating the FrameBuffer. jPCT-AE will then use this file to search for
it's shaders instead.
Method Summary |
java.lang.String |
getShaderCode(java.lang.String name)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShaderLocator
public ShaderLocator()
ShaderLocator
public ShaderLocator(AssetManager assets)
ShaderLocator
public ShaderLocator(Resources res,
int rawResourceId)
getShaderCode
public java.lang.String getShaderCode(java.lang.String name)
throws java.io.IOException
- Throws:
java.io.IOException