Class TextureBufferImpl

java.lang.Object
cz.fidentis.analyst.glsl.buffers.impl.AbstractBuffer
cz.fidentis.analyst.glsl.buffers.impl.TextureBufferImpl
All Implemented Interfaces:
GlslBuffer, TextureBuffer

public class TextureBufferImpl extends AbstractBuffer implements TextureBuffer
A texture buffer backed by another buffer. This buffer is used for the GL_TEXTURE_BUFFER OpenGL target.
  • Constructor Details

    • TextureBufferImpl

      public TextureBufferImpl(BufferDef bufferName, com.jogamp.opengl.GLContext glContext, int internalFormat, int access)
      Constructor.
      Parameters:
      bufferName - Buffer name
      glContext - OpenGL context
      internalFormat - The format parameter of the glBindImageTexture function and internalFormat of the glTexBuffer and glTexImage2D functions
      access - The access parameter of the glBindImageTexture function
  • Method Details

    • allocate

      public void allocate(int filter, int dataObject)
      Description copied from interface: TextureBuffer
      Allocates the buffer using glTexBuffer OpenGL method
      Specified by:
      allocate in interface TextureBuffer
      Parameters:
      filter - Filtering mode
      dataObject - 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 a GlslBufferGroup, use GlslBufferGroup.bindBuffer(cz.fidentis.analyst.glsl.buffers.BufferDef) to bind buffers individually or GlslBufferGroup.bindSsboBuffers() to allocate all SSBO buffers at once.
      Specified by:
      bind in interface GlslBuffer