Class TextureBufferImpl
java.lang.Object
cz.fidentis.analyst.glsl.buffers.impl.AbstractBuffer
cz.fidentis.analyst.glsl.buffers.impl.TextureBufferImpl
- All Implemented Interfaces:
GlslBuffer
,TextureBuffer
A texture buffer backed by another buffer.
This buffer is used for the
GL_TEXTURE_BUFFER
OpenGL target.-
Constructor Summary
ConstructorsConstructorDescriptionTextureBufferImpl
(BufferDef bufferName, com.jogamp.opengl.GLContext glContext, int internalFormat, int access) Constructor. -
Method Summary
Methods inherited from class cz.fidentis.analyst.glsl.buffers.impl.AbstractBuffer
getBindingIndex, getBufferName, getGlName, getGlTarget, glContext, setGlName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.fidentis.analyst.glsl.buffers.GlslBuffer
getBindingIndex, getBufferName, getGlName, getGlTarget, glContext
-
Constructor Details
-
TextureBufferImpl
public TextureBufferImpl(BufferDef bufferName, com.jogamp.opengl.GLContext glContext, int internalFormat, int access) Constructor.- Parameters:
bufferName
- Buffer nameglContext
- OpenGL contextinternalFormat
- Theformat
parameter of theglBindImageTexture
function andinternalFormat
of theglTexBuffer
andglTexImage2D
functionsaccess
- Theaccess
parameter of theglBindImageTexture
function
-
-
Method Details
-
allocate
public void allocate(int filter, int dataObject) Description copied from interface:TextureBuffer
Allocates the buffer usingglTexBuffer
OpenGL method- Specified by:
allocate
in interfaceTextureBuffer
- Parameters:
filter
- Filtering modedataObject
- name of the buffer object which data store gets attached to the texture object
-
bind
public void bind()Description copied from interface:GlslBuffer
Binds this buffer to the OpenGL context (binding points of GPU rendering pipeline), so it become visible for shaders. Buffers can be bound to their binding points even unallocated. Do not use this method directly. As every buffer should be included in aGlslBufferGroup
, useGlslBufferGroup.bindBuffer(cz.fidentis.analyst.glsl.buffers.BufferDef)
to bind buffers individually orGlslBufferGroup.bindSsboBuffers()
to allocate all SSBO buffers at once.- Specified by:
bind
in interfaceGlslBuffer
-