com.jogamp.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, sets the client state, binds the VBO if used and transfers the data if necessary.
 boolean enabled()
           
 boolean isVBOWritten()
          Is the buffer written to the VBO ?
 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 disables write operations to the buffer.
 void seal(GL gl, boolean seal)
          Convenience method calling seal(boolean) and enableBuffer(GL, boolean).
 boolean sealed()
           
 void setEnableAlways(boolean always)
          Affects the behavior of 'enableBuffer'.
 void setVBOWritten(boolean written)
          Marks the buffer written to the VBO
 
Methods inherited from interface javax.media.opengl.GLArrayData
getBuffer, getComponentCount, getComponentSizeInBytes, getComponentType, getElementCount, getIndex, getLocation, getName, getNormalized, getSizeInBytes, getStride, getVBOName, getVBOOffset, getVBOTarget, getVBOUsage, isVBO, isVertexAttribute, setLocation, setName, toString
 

Method Detail

sealed

boolean sealed()

enabled

boolean enabled()

isVBOWritten

boolean isVBOWritten()
Is the buffer written to the VBO ?


setVBOWritten

void setVBOWritten(boolean written)
Marks the buffer written to the VBO


destroy

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

reset

void reset(GL gl)

seal

void seal(GL gl,
          boolean seal)
Convenience method calling seal(boolean) and enableBuffer(GL, boolean).

See Also:
seal(boolean), enableBuffer(GL, boolean)

enableBuffer

void enableBuffer(GL gl,
                  boolean enable)

Enables/disables the buffer, sets the client state, binds the VBO if used and transfers the data if necessary.

The action will only be executed, if the internal enable state differs, or 'setEnableAlways' was called with 'true'.

It is up to the user to enable/disable the array properly, ie in case of multiple data sets for the same vertex attribute (VA). Meaning in such case usage of one set while expecting another one to be used for the same VA implies decorating each usage with enable/disable.

See Also:
setEnableAlways(boolean)

setEnableAlways

void setEnableAlways(boolean always)
Affects the behavior of 'enableBuffer'. The default is 'false' This is useful when you mix up GLArrayData usage with conventional GL array calls or in case of a buggy GL VBO implementation.

See Also:
enableBuffer(GL, boolean)

reset

void reset()

seal

void seal(boolean seal)

If seal is true, it disables 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.

See Also:
seal(boolean)

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 2010 JogAmp Community.