Package cz.fidentis.analyst.glsl.buffers
Interface PixelUnpackBuffer
- All Superinterfaces:
GlslBuffer
- All Known Implementing Classes:
PixelUnpackBufferImpl
A buffer for
GL_PIXEL_UNPACK_BUFFER
target.-
Method Summary
Methods inherited from interface cz.fidentis.analyst.glsl.buffers.GlslBuffer
bind, getBindingIndex, getBufferName, getGlName, getGlTarget, glContext
-
Method Details
-
getUsage
int getUsage()Returns buffer usage type- Returns:
- usage type
-
getItemSize
long getItemSize()This buffer stores some amount of items of the same type (integers, floats, etc.). Therefore, this method returns the size (number of bytes) of a single item.- Returns:
- items' size
-
allocate
void allocate(long items, boolean reset) Allocates memory for this buffer on GPU. Can be used multiple times to resize the buffer. Resulting buffer will occupyitems *
getItemSize()
bytes.- Parameters:
items
- how many items are going to be in the buffer (resulting buffer will haveitems * ssboDef.getItemSize()
bytes)reset
- iftrue
, then fills the buffer by zeros
-