com.sun.opengl.util
Interface GLArrayDataEditable

All Superinterfaces:
GLArrayData
All Known Implementing Classes:
GLArrayDataClient, GLArrayDataServer

public interface GLArrayDataEditable
extends GLArrayData

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


Method Summary
 void destroy(GL gl)
           
 void enableBuffer(GL gl, boolean enable)
          Enables/disables the buffer, which implies the client state, binding the VBO and transfering the data if not done yet.
 int getBufferUsage()
          The VBO buffer usage, if it's an VBO, otherwise -1
 boolean isBufferWritten()
          Is the buffer written to the GPU ?
 void padding(int done)
           
 void put(Buffer v)
           
 void putb(byte v)
           
 void putf(float v)
           
 void puti(int v)
           
 void puts(short v)
           
 void putx(int v)
           
 void reset()
           
 void reset(GL gl)
           
 void rewind()
           
 void seal(boolean seal)
          If seal is true, it disable write operations to the buffer.
 void seal(GL gl, boolean seal)
          If seal is true, it disable write operations to the buffer.
 boolean sealed()
           
 void setBufferWritten(boolean written)
          Marks the buffer written to the GPU
 void setEnableAlways(boolean always)
          Affects the behavior of 'enableBuffer'.
 
Methods inherited from interface javax.media.opengl.GLArrayData
getBuffer, getComponentNumber, getComponentSize, getComponentType, getElementNumber, getIndex, getLocation, getName, getNormalized, getOffset, getStride, getVBOName, isVBO, isVertexAttribute, setLocation, setName, toString
 

Method Detail

sealed

boolean sealed()

getBufferUsage

int getBufferUsage()
The VBO buffer usage, if it's an VBO, otherwise -1


isBufferWritten

boolean isBufferWritten()
Is the buffer written to the GPU ?


setBufferWritten

void setBufferWritten(boolean written)
Marks the buffer written to the GPU


destroy

void destroy(GL gl)
Specified by:
destroy in interface GLArrayData

reset

void reset(GL gl)

seal

void seal(GL gl,
          boolean seal)
If seal is true, it disable write operations to the buffer. Calls flip, ie limit:=position and position:=0. Also enables the buffer for OpenGL, and passes the data. If seal is false, it enable write operations continuing at the buffer position, where you left off at seal(true), ie position:=limit and limit:=capacity. Also disables the buffer for OpenGL.

See Also:
seal(boolean)

enableBuffer

void enableBuffer(GL gl,
                  boolean enable)
Enables/disables the buffer, which implies the client state, binding the VBO and transfering the data if not done yet. The above will only be executed, if the buffer is disabled, or 'setEnableAlways' was called with 'true'.

See Also:
setEnableAlways(boolean)

setEnableAlways

void setEnableAlways(boolean always)
Affects the behavior of 'enableBuffer'. The default is 'false' This is usefull when you mix up GLArrayData usage with conventional GL array calls.

See Also:
enableBuffer(GL, boolean)

reset

void reset()

seal

void seal(boolean seal)
If seal is true, it disable write operations to the buffer. Calls flip, ie limit:=position and position:=0. If seal is false, it enable write operations continuing at the buffer position, where you left off at seal(true), ie position:=limit and limit:=capacity.


rewind

void rewind()

padding

void padding(int done)

put

void put(Buffer v)

putb

void putb(byte v)

puts

void puts(short v)

puti

void puti(int v)

putx

void putx(int v)

putf

void putf(float v)


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