Package com.jme3.shader.bufferobject
Class BufferRegion
java.lang.Object
com.jme3.shader.bufferobject.BufferRegion
A slice of a buffer
-
Field Summary
Modifier and TypeFieldDescriptionprotected BufferObject
protected boolean
protected int
protected boolean
protected ByteBuffer
protected ByteBuffer
protected int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear this region markclone()
getData()
Rewind and get a ByteBuffer pointing to this region of the main bufferint
getEnd()
Get end of the regionint
getStart()
Get beginning of the regionboolean
isDirty()
Returns true of the region is dirtyboolean
Returns true if this region includes the entire buffer.int
length()
Get the length of this regionvoid
Mark this region for updatevoid
read
(JmeImporter im) toString()
void
write
(JmeExporter ex)
-
Field Details
-
start
protected int start -
end
protected int end -
dirty
protected boolean dirty -
fullBufferRegion
protected boolean fullBufferRegion -
bo
-
slice
-
source
-
-
Constructor Details
-
BufferRegion
public BufferRegion(int start, int end) -
BufferRegion
public BufferRegion()
-
-
Method Details
-
getData
Rewind and get a ByteBuffer pointing to this region of the main buffer- Returns:
- ByteBuffer
-
getStart
public int getStart()Get beginning of the region- Returns:
- position in the buffer
-
getEnd
public int getEnd()Get end of the region- Returns:
- position in the buffer
-
length
public int length()Get the length of this region- Returns:
- the length of this region
-
isDirty
public boolean isDirty()Returns true of the region is dirty- Returns:
-
markDirty
public void markDirty()Mark this region for update -
clearDirty
public void clearDirty()Clear this region mark -
isFullBufferRegion
public boolean isFullBufferRegion()Returns true if this region includes the entire buffer. Can be used for optimization.- Returns:
-
toString
-
write
- Specified by:
write
in interfaceSavable
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Throws:
IOException
-
clone
-