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
Class GLArrayDataServer

    java.lang.Object
      com.sun.opengl.util.GLArrayDataWrapper
          com.sun.opengl.util.GLArrayDataClient
              com.sun.opengl.util.GLArrayDataServer

All Implemented Interfaces:
  GLArrayDataEditable, GLArrayData

    public class GLArrayDataServer

extends GLArrayDataClient
implements GLArrayDataEditable

Field Summary
`protected int` | `vboBufferUsage`

Fields inherited from class com.sun.opengl.util.GLArrayDataClient
`bufferEnabled, bufferWritten, enableBufferAlways, glArrayHandler, hasVBOBug, initialSize, sealed, sealedGL`

Fields inherited from class com.sun.opengl.util.GLArrayDataWrapper
`buffer, bufferOffset, clazz, components, dataType, index, isVertexAttribute, location, name, normalized, stride, strideB, strideL, vboName, vboUsage`

Constructor Summary
`GLArrayDataServer()`

Method Summary
`static GLArrayDataServer` | `createFixed(GL gl, int index, String name, int comps, int dataType, boolean normalized, int stride, Buffer buffer, int vboBufferUsage)` Create a VBOBuffer object, using a predefined fixed function array index and starting with a given Buffer object incl it's stride On profiles GL2 and ES1 the fixed function pipeline behavior is as expected.
`static GLArrayDataServer` | `createFixed(GL gl, int index, String name, int comps, int dataType, boolean normalized, int initialSize, int vboBufferUsage)` Create a VBOBuffer object, using a predefined fixed function array index and starting with a new created Buffer object with initialSize size On profiles GL2 and ES1 the fixed function pipeline behavior is as expected.
`static GLArrayDataServer` | `createGLSL(GL gl, String name, int comps, int dataType, boolean normalized, int stride, Buffer buffer, int vboBufferUsage)` Create a VBOBuffer object, using a custom GLSL array attribute name and starting with a given Buffer object incl it's stride
`static GLArrayDataServer` | `createGLSL(GL gl, String name, int comps, int dataType, boolean normalized, int initialSize, int vboBufferUsage)` Create a VBOBuffer object, using a custom GLSL array attribute name and starting with a new created Buffer object with initialSize size
`void` | `destroy(GL gl)`
`int` | `getBufferUsage()` The VBO buffer usage, if it's an VBO, otherwise -1
`protected void` | `init_vbo(GL gl)`
`protected void` | `init(GL gl, String name, int index, int comps, int dataType, boolean normalized, int stride, Buffer data, int initialSize, boolean isVertexAttribute, GLArrayHandler glArrayHandler, int vboName, long bufferOffset, int vboBufferUsage)`
`void` | `setVBOUsage(boolean vboUsage)` Convenient way do disable the VBO behavior and switch to client side data one Only possible if buffer is defined.
`String` | `toString()`

Methods inherited from class com.sun.opengl.util.GLArrayDataClient
`checkSeal, createFixed, createFixed, createGLSL, createGLSL, enableBuffer, growBuffer, growBufferIfNecessary, init, isBufferWritten, padding, put, putb, putf, puti, puts, putx, reset, reset, rewind, seal, seal, sealed, setBufferWritten, setEnableAlways`

Methods inherited from class com.sun.opengl.util.GLArrayDataWrapper
`createFixed, createGLSL, getBuffer, getBufferClass, getBufferClass, getComponentNumber, getComponentSize, getComponentType, getElementNumber, getIndex, getLocation, getName, getNormalized, getOffset, getStride, getVBOName, init, isVBO, isVertexAttribute, setLocation, setName, setVBOName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.sun.opengl.util.GLArrayDataEditable
`enableBuffer, isBufferWritten, padding, put, putb, putf, puti, puts, putx, reset, reset, rewind, seal, seal, sealed, setBufferWritten, setEnableAlways`

Methods inherited from interface javax.media.opengl.GLArrayData
`getBuffer, getComponentNumber, getComponentSize, getComponentType, getElementNumber, getIndex, getLocation, getName, getNormalized, getOffset, getStride, getVBOName, isVBO, isVertexAttribute, setLocation, setName`

Field Detail

### vboBufferUsage

    protected int vboBufferUsage

Constructor Detail

### GLArrayDataServer

    public GLArrayDataServer()

Method Detail

### createFixed

    public static GLArrayDataServer createFixed(GL gl,
                                                int index,
                                                String name,
                                                int comps,
                                                int dataType,
                                                boolean normalized,
                                                int stride,
                                                Buffer buffer,
                                                int vboBufferUsage)
                                         throws GLException

  Create a VBOBuffer object, using a predefined fixed function array index and starting with a given Buffer object incl it's stride On profiles GL2 and ES1 the fixed function pipeline behavior is as expected. On profile ES2 the fixed function emulation will transform these calls to EnableVertexAttribArray and VertexAttribPointer calls, and a predefined vertex attribute variable name will be choosen.

  Parameters:
    `index` - The GL array index
    `name` - The optional custom name for the GL array index, maybe null. If null, the default name mapping will be used, see 'getPredefinedArrayIndexName(int)'. This name might be used as the shader attribute name.
    `comps` - The array component number
    `dataType` - The array index GL data type
    `normalized` - Wheather the data shall be normalized
  Throws:
    `GLException`
  See Also:
    `javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)`

### createFixed

    public static GLArrayDataServer createFixed(GL gl,
                                                int index,
                                                String name,
                                                int comps,
                                                int dataType,
                                                boolean normalized,
                                                int initialSize,
                                                int vboBufferUsage)
                                         throws GLException

  Create a VBOBuffer object, using a predefined fixed function array index and starting with a new created Buffer object with initialSize size On profiles GL2 and ES1 the fixed function pipeline behavior is as expected. On profile ES2 the fixed function emulation will transform these calls to EnableVertexAttribArray and VertexAttribPointer calls, and a predefined vertex attribute variable name will be choosen.

  Throws:
    `GLException`
  See Also:
    `javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)`

### createGLSL

    public static GLArrayDataServer createGLSL(GL gl,
                                               String name,
                                               int comps,
                                               int dataType,
                                               boolean normalized,
                                               int initialSize,
                                               int vboBufferUsage)
                                        throws GLException

  Create a VBOBuffer object, using a custom GLSL array attribute name and starting with a new created Buffer object with initialSize size

  Throws:
    `GLException`
  See Also:
    `javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)`

### createGLSL

    public static GLArrayDataServer createGLSL(GL gl,
                                               String name,
                                               int comps,
                                               int dataType,
                                               boolean normalized,
                                               int stride,
                                               Buffer buffer,
                                               int vboBufferUsage)
                                        throws GLException

  Create a VBOBuffer object, using a custom GLSL array attribute name and starting with a given Buffer object incl it's stride

  Throws:
    `GLException`
  See Also:
    `javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)`

### getBufferUsage

    public int getBufferUsage()

  Description copied from interface: `GLArrayDataEditable`
  The VBO buffer usage, if it's an VBO, otherwise -1

  Specified by:
    `getBufferUsage` in interface `GLArrayDataEditable`
  Overrides:
    `getBufferUsage` in class `GLArrayDataClient`

### destroy

    public void destroy(GL gl)

  Specified by:
    `destroy` in interface `GLArrayDataEditable`
  Specified by:
    `destroy` in interface `GLArrayData`
  Overrides:
    `destroy` in class `GLArrayDataClient`

### setVBOUsage

    public void setVBOUsage(boolean vboUsage)

  Convenient way do disable the VBO behavior and switch to client side data one Only possible if buffer is defined.

  Overrides:
    `setVBOUsage` in class `GLArrayDataWrapper`

### toString

    public String toString()

  Specified by:
    `toString` in interface `GLArrayData`
  Overrides:
    `toString` in class `GLArrayDataClient`

### init

    protected void init(GL gl,
                        String name,
                        int index,
                        int comps,
                        int dataType,
                        boolean normalized,
                        int stride,
                        Buffer data,
                        int initialSize,
                        boolean isVertexAttribute,
                        GLArrayHandler glArrayHandler,
                        int vboName,
                        long bufferOffset,
                        int vboBufferUsage)
                 throws GLException

  Throws:
    `GLException`

### init_vbo

    protected void init_vbo(GL gl)

  Overrides:
    `init_vbo` in class `GLArrayDataClient`

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.