com.jogamp.opengl.util.glsl
Class ShaderCode

java.lang.Object
  extended by com.jogamp.opengl.util.glsl.ShaderCode

public class ShaderCode
extends Object


Field Summary
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 Summary
ShaderCode(int type, int number, int binFormat, Buffer binary)
           
ShaderCode(int type, int number, String[][] source)
           
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG

DEBUG_CODE

public static final boolean DEBUG_CODE

SUFFIX_VERTEX_SOURCE

public static final String SUFFIX_VERTEX_SOURCE
See Also:
Constant Field Values

SUFFIX_VERTEX_BINARY

public static final String SUFFIX_VERTEX_BINARY
See Also:
Constant Field Values

SUFFIX_FRAGMENT_SOURCE

public static final String SUFFIX_FRAGMENT_SOURCE
See Also:
Constant Field Values

SUFFIX_FRAGMENT_BINARY

public static final String SUFFIX_FRAGMENT_BINARY
See Also:
Constant Field Values

SUB_PATH_NVIDIA

public static final String SUB_PATH_NVIDIA
See Also:
Constant Field Values
Constructor Detail

ShaderCode

public ShaderCode(int type,
                  int number,
                  String[][] source)

ShaderCode

public ShaderCode(int type,
                  int number,
                  int binFormat,
                  Buffer binary)
Method Detail

create

public static ShaderCode create(GL2ES2 gl,
                                int type,
                                int number,
                                Class<?> context,
                                String[] sourceFiles)

create

public static ShaderCode create(int type,
                                int number,
                                Class<?> context,
                                int binFormat,
                                String binaryFile)

getFileSuffix

public static String getFileSuffix(boolean binary,
                                   int type)

getBinarySubPath

public static String getBinarySubPath(int binFormat)

create

public static ShaderCode create(GL2ES2 gl,
                                int type,
                                int number,
                                Class<?> context,
                                String srcRoot,
                                String binRoot,
                                String basename)

id

public int id()
returns the uniq shader id as an integer


shaderType

public int shaderType()

shaderTypeStr

public String shaderTypeStr()

shaderTypeStr

public static String shaderTypeStr(int type)

shaderBinaryFormat

public int shaderBinaryFormat()

shaderBinary

public Buffer shaderBinary()

shaderSource

public String[][] shaderSource()

isValid

public boolean isValid()

shader

public IntBuffer shader()

compile

public boolean compile(GL2ES2 gl)

compile

public boolean compile(GL2ES2 gl,
                       PrintStream verboseOut)

destroy

public void destroy(GL2ES2 gl)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

dumpShaderSource

public void dumpShaderSource(PrintStream out)

readShaderSource

public static void readShaderSource(Class<?> context,
                                    URL url,
                                    StringBuffer result)

readShaderSource

public static String readShaderSource(Class<?> context,
                                      String path)

readShaderBinary

public static ByteBuffer readShaderBinary(Class<?> context,
                                          String path)


Copyright 2010 JogAmp Community.