Package com.jme3.shader.bufferobject
Class BufferRegion
java.lang.Object
com.jme3.shader.bufferobject.BufferRegion
A slice of a buffer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BufferObjectprotected booleanprotected intprotected booleanprotected ByteBufferprotected ByteBufferprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear this region markclone()getData()Rewind and get a ByteBuffer pointing to this region of the main bufferintgetEnd()Get end of the regionintgetStart()Get beginning of the regionbooleanisDirty()Returns true of the region is dirtybooleanReturns true if this region includes the entire buffer.intlength()Get the length of this regionvoidMark this region for updatevoidread(JmeImporter im) toString()voidwrite(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:
writein interfaceSavable- Throws:
IOException
-
read
- Specified by:
readin interfaceSavable- Throws:
IOException
-
clone
-