public class ShaderCode extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
static boolean |
DEBUG_CODE |
static String |
SUB_PATH_NVIDIA |
static String |
SUFFIX_FRAGMENT_BINARY |
static String |
SUFFIX_FRAGMENT_SOURCE |
static String |
SUFFIX_VERTEX_BINARY |
static String |
SUFFIX_VERTEX_SOURCE |
Constructor and Description |
---|
ShaderCode(int type,
int number,
int binFormat,
Buffer binary) |
ShaderCode(int type,
int number,
String[][] source) |
Modifier and Type | Method and Description |
---|---|
boolean |
compile(GL2ES2 gl) |
boolean |
compile(GL2ES2 gl,
PrintStream verboseOut) |
static ShaderCode |
create(GL2ES2 gl,
int type,
int number,
Class<?> context,
String[] sourceFiles) |
static ShaderCode |
create(GL2ES2 gl,
int type,
int number,
Class<?> context,
String srcRoot,
String binRoot,
String basename) |
static ShaderCode |
create(int type,
int number,
Class<?> context,
int binFormat,
String binaryFile) |
void |
destroy(GL2ES2 gl) |
void |
dumpShaderSource(PrintStream out) |
boolean |
equals(Object obj) |
static String |
getBinarySubPath(int binFormat) |
static String |
getFileSuffix(boolean binary,
int type) |
int |
hashCode() |
int |
id()
returns the uniq shader id as an integer
|
boolean |
isValid() |
static ByteBuffer |
readShaderBinary(Class<?> context,
String path) |
static String |
readShaderSource(Class<?> context,
String path) |
static void |
readShaderSource(Class<?> context,
URL url,
StringBuffer result) |
IntBuffer |
shader() |
Buffer |
shaderBinary() |
int |
shaderBinaryFormat() |
String[][] |
shaderSource() |
int |
shaderType() |
String |
shaderTypeStr() |
static String |
shaderTypeStr(int type) |
String |
toString() |
public static final boolean DEBUG
public static final boolean DEBUG_CODE
public static final String SUFFIX_VERTEX_SOURCE
public static final String SUFFIX_VERTEX_BINARY
public static final String SUFFIX_FRAGMENT_SOURCE
public static final String SUFFIX_FRAGMENT_BINARY
public static final String SUB_PATH_NVIDIA
public ShaderCode(int type, int number, String[][] source)
public ShaderCode(int type, int number, int binFormat, Buffer binary)
public static ShaderCode create(GL2ES2 gl, int type, int number, Class<?> context, String[] sourceFiles)
public static ShaderCode create(int type, int number, Class<?> context, int binFormat, String binaryFile)
public static String getFileSuffix(boolean binary, int type)
public static String getBinarySubPath(int binFormat)
public static ShaderCode create(GL2ES2 gl, int type, int number, Class<?> context, String srcRoot, String binRoot, String basename)
public int id()
public int shaderType()
public String shaderTypeStr()
public static String shaderTypeStr(int type)
public int shaderBinaryFormat()
public Buffer shaderBinary()
public String[][] shaderSource()
public boolean isValid()
public IntBuffer shader()
public boolean compile(GL2ES2 gl)
public boolean compile(GL2ES2 gl, PrintStream verboseOut)
public void destroy(GL2ES2 gl)
public void dumpShaderSource(PrintStream out)
public static void readShaderSource(Class<?> context, URL url, StringBuffer result)
public static ByteBuffer readShaderBinary(Class<?> context, String path)
Copyright 2010 JogAmp Community.