Static
bufferGets the buffer height length from the configuration.
The data texture height from Config
Static
bufferGets the buffer width length from the configuration.
The data texture width from Config
Creates a buffer on-demand with custom size and alignment for a specific object. These buffers are typically used for UBOs (Uniform Buffer Objects).
The size of the buffer in bytes
The RnObject that will own this buffer
The byte alignment requirement for the buffer
The newly created Buffer instance
Static
createCreates a MemoryManager instance if it doesn't exist, or returns the existing instance. This method enforces the singleton pattern.
Configuration object containing memory size ratios
Memory size ratio for CPU generic data
Memory size ratio for GPU instance data
Memory size ratio for GPU vertex data
The MemoryManager singleton instance
Static
getGets the singleton instance of MemoryManager.
The MemoryManager instance
MemoryManager is a singleton class that manages the memory allocation and buffers for the Rhodonite library. It handles different types of buffers including CPU generic data, GPU instance data, and GPU vertex data.