Class SoCpuBufferCompressed

All Implemented Interfaces:
SafeDisposable

public class SoCpuBufferCompressed extends SoCpuBufferObject
LDM buffer object optimized for compressed tile data. This type of buffer efficiently represents a tile containing compressed data (usually read from a compressed LDM file). The buffer can be used like any other buffer, but uses much less memory when its contents are not actually being accessed.

SoBufferPropertiesInterface

See Also:
  • Constructor Details

    • SoCpuBufferCompressed

      public SoCpuBufferCompressed()
      Default constructor.
    • SoCpuBufferCompressed

      public SoCpuBufferCompressed(SoDataCompressor compressor)
      Constructor with compressor given as parameter.
  • Method Details

    • map

      public void map(SoCpuBufferObject targetBufferObject, SoBufferObject.AccessModes accessMode, long startPosition)
      Calls map(targetBufferObject, accessMode, startPosition, (long)SO_BUFFER_SIZE_ALL).
    • map

      public void map(SoGLBufferObject targetBufferObject, SoBufferObject.AccessModes accessMode)
      Calls map(targetBufferObject, accessMode, (long)0, (long)SO_BUFFER_SIZE_ALL).
    • map

      public void map(SoGLBufferObject targetBufferObject, SoBufferObject.AccessModes accessMode, long startPosition)
      Calls map(targetBufferObject, accessMode, startPosition, (long)SO_BUFFER_SIZE_ALL).
    • map

      public void map(SoCpuBufferObject targetBufferObject, SoBufferObject.AccessModes accessMode)
      Calls map(targetBufferObject, accessMode, (long)0, (long)SO_BUFFER_SIZE_ALL).
    • unmap

      public void unmap(SoGLBufferObject bufferObject)
      Unmap the specified GL buffer object
      It is defined just to speed up the call when the type of the object is known.
      If the access mode supports writing the specified buffer is sync'd with the buffer.

      See the general unmap function for more information.

      Parameters:
      bufferObject - Buffer to be unmapped.
    • map

      public void map(SoCpuBufferObject targetBufferObject, SoBufferObject.AccessModes accessMode, long startPosition, long mappingSize)
      Map the current buffer object into the specified CPU buffer object.

      See the general map method for more information.

    • map

      public void map(SoGLBufferObject targetBufferObject, SoBufferObject.AccessModes accessMode, long startPosition, long mappingSize)
      Map the current buffer object into the specified GL buffer object.

      See the general map method for more information.

    • getMinMax

      public double[] getMinMax()
      Get the min and max values in the buffer, if they are known.
      Returns false if these values have not been set or computed. Returns true if values are available.

      Parameters:
      min - user variable to store min value

      max - user variable to store max value
    • unmap

      public void unmap(SoCpuBufferObject bufferObject)
      Unmap the specified CPU buffer object
      It is defined just to speed up the call when the type of the object is known.
      Remove the specified bufferObject from the list of buffers which map the current buffer.

      See the general unmap function for more information.

    • getRealSize

      public long getRealSize()
      Returns the size of the uncompressed data in bytes.
    • setMinMax

      public void setMinMax(double min, double max)
      Set the min and max values for this buffer.

      Parameters:
      min - user variable containing min value

      max - user variable containing max value
    • setCompressor

      public void setCompressor(SoDataCompressor compressor)
      Set the compressor used to decompress buffer.

      Parameters:
      compressor - Pointer to the compressor to use