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

## javax.media.opengl
Interface GLArrayData

All Known Subinterfaces:
  GLArrayDataEditable

All Known Implementing Classes:
  GLArrayDataClient, GLArrayDataServer, GLArrayDataWrapper

    public interface GLArrayData

The total number of bytes hold by the referenced buffer is: getComponentSize()* getComponentNumber() * getElementNumber()

Method Summary
`void` | `destroy(GL gl)`
`Buffer` | `getBuffer()` The Buffer holding the data, may be null in case of VBO
`int` | `getComponentNumber()` The number of components per element
`int` | `getComponentSize()` The components size in bytes
`int` | `getComponentType()` The component's GL data type, ie.
`int` | `getElementNumber()` Return the number of elements.
`int` | `getIndex()` The index of the predefined array index, see list below, or -1 in case of a shader attribute array.
`int` | `getLocation()` Returns the shader attribute location for this name, -1 if not yet determined
`String` | `getName()` The name of the reflecting shader array attribute.
`boolean` | `getNormalized()` True, if GL shall normalize fixed point data while converting them into float
`long` | `getOffset()` The offset, if it's an VBO, otherwise -1
`int` | `getStride()` The distance to the next payload, allowing interleaved arrays.
`int` | `getVBOName()` The VBO name, if it's an VBO, otherwise -1
`boolean` | `isVBO()` Determines wheather the data is server side (VBO), or a client side array (false).
`boolean` | `isVertexAttribute()` Returns true if this data set is intended for a GLSL vertex shader attribute, otherwise false, ie intended for fixed function vertex pointer
`void` | `setLocation(int v)` Sets the determined location of the shader attribute This is usually done within ShaderState.
`void` | `setName(String newName)` Set a new name for this array.
`String` | `toString()`

Method Detail

### isVertexAttribute

    boolean isVertexAttribute()

  Returns true if this data set is intended for a GLSL vertex shader attribute, otherwise false, ie intended for fixed function vertex pointer

### getIndex

    int getIndex()

  The index of the predefined array index, see list below, or -1 in case of a shader attribute array.

  See Also:
    `javax.media.opengl.GL#GL_VERTEX_ARRAY`, `javax.media.opengl.GL#GL_NORMAL_ARRAY`, `javax.media.opengl.GL#GL_COLOR_ARRAY`, `javax.media.opengl.GL#GL_TEXTURE_COORD_ARRAY`

### getName

    String getName()

  The name of the reflecting shader array attribute.

### setName

    void setName(String newName)

  Set a new name for this array.

### getLocation

    int getLocation()

  Returns the shader attribute location for this name, -1 if not yet determined

### setLocation

    void setLocation(int v)

  Sets the determined location of the shader attribute This is usually done within ShaderState.

  See Also:
    `javax.media.opengl.glsl.ShaderState#glVertexAttribPointer(GL2ES2, GLArrayData)`

### isVBO

    boolean isVBO()

  Determines wheather the data is server side (VBO), or a client side array (false).

### getOffset

    long getOffset()

  The offset, if it's an VBO, otherwise -1

### getVBOName

    int getVBOName()

  The VBO name, if it's an VBO, otherwise -1

### getBuffer

    Buffer getBuffer()

  The Buffer holding the data, may be null in case of VBO

### getComponentNumber

    int getComponentNumber()

  The number of components per element

### getComponentType

    int getComponentType()

  The component's GL data type, ie. GL_FLOAT

### getComponentSize

    int getComponentSize()

  The components size in bytes

### getElementNumber

    int getElementNumber()

  Return the number of elements.

### getNormalized

    boolean getNormalized()

  True, if GL shall normalize fixed point data while converting them into float

### getStride

    int getStride()

  The distance to the next payload, allowing interleaved arrays.

### toString

    String toString()

  Overrides:
    `toString` in class `Object`

### destroy

    void destroy(GL gl)

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.