ShaderStorageBufferGL43

data class ShaderStorageBufferGL43(val buffer: Int, val ownsBuffer: Boolean, val format: ShaderStorageFormat, val session: Session? = Session.active) : ShaderStorageBuffer(source)

Represents an OpenGL Shader Storage Buffer Object (SSBO) for use in the OpenGL 4.3+ context.

This class is utilized to manage shader storage buffers, allowing them to be cleared, written to, read from, and manipulated as per the shader storage format provided. The ShaderStorageBufferGL43 is tied to a session and its lifecycle can be controlled through the session or its manual destruction.

Constructors

Link copied to clipboard
constructor(buffer: Int, ownsBuffer: Boolean, format: ShaderStorageFormat, session: Session? = Session.active)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val buffer: Int

The OpenGL buffer identifier (ID), representing the underlying SSBO.

Link copied to clipboard
open override val format: ShaderStorageFormat

Defines the shader storage format specifying the data layout in the shader storage buffer.

Link copied to clipboard

Indicates if this instance owns the buffer, determining responsibility for cleanup.

Link copied to clipboard
open override val session: Session?

The session tied to the buffer, used for tracking and resource management.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun clear()
Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun createByteBuffer(): ByteBuffer

Create a byte buffer matching the format size to be able to download the SSBO to the CPU. Note that the buffer will contain padding following elements that need it.

Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open override fun put(elementOffset: Int, putter: BufferWriter.() -> Unit): Int
Link copied to clipboard
open override fun read(target: ByteBuffer, readOffset: Int)
Link copied to clipboard
open override fun write(source: ByteBuffer, writeOffset: Int)