Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.opengl.util.glsl
Class ShaderCode

    java.lang.Object
      com.sun.opengl.util.glsl.ShaderCode

    public class ShaderCode

extends Object

Field Summary
`static boolean` | `DEBUG`
`static boolean` | `DEBUG_CODE`
`protected Integer` | `id`
`protected static int` | `nextID`
`protected IntBuffer` | `shader`
`protected Buffer` | `shaderBinary`
`protected int` | `shaderBinaryFormat`
`protected String[][]` | `shaderSource`
`protected int` | `shaderType`
`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`
`protected boolean` | `valid`

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()`
`Integer` | `key()` returns the uniq shader id as an Integer
`static ByteBuffer` | `readShaderBinary(Class context, String path)`
`static void` | `readShaderSource(ClassLoader context, String path, URL url, StringBuffer result)`
`static String` | `readShaderSource(Class context, String path)`
`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
`clone, finalize, 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

### shaderSource

    protected String[][] shaderSource

### shaderBinary

    protected Buffer shaderBinary

### shaderBinaryFormat

    protected int shaderBinaryFormat

### shader

    protected IntBuffer shader

### shaderType

    protected int shaderType

### id

    protected Integer id

### valid

    protected boolean valid

### nextID

    protected static int nextID

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

  See Also:
    `key()`

### key

    public Integer key()

  returns the uniq shader id as an Integer

  See Also:
    `id()`

### 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(ClassLoader context,
                                        String path,
                                        URL url,
                                        StringBuffer result)

### readShaderSource

    public static String readShaderSource(Class context,
                                          String path)

### readShaderBinary

    public static ByteBuffer readShaderBinary(Class context,
                                              String path)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.