docs/android/dokka/filament-android/com.google.android.filament/-texture/-pixel-buffer-descriptor/index.md
//filament-android/com.google.android.filament/Texture/PixelBufferDescriptor
open class PixelBufferDescriptor
A descriptor to an image in main memory, typically used to transfer image data from the CPU to the GPU.
A PixelBufferDescriptor owns the memory buffer it references, therefore PixelBufferDescriptor cannot be copied, but can be moved.
PixelBufferDescriptor releases ownership of the memory-buffer when it's destroyed.
| setImage |
| PixelBufferDescriptor | [main] |
| constructor(storage: Buffer, format: Texture.Format, type: Texture.Type, alignment: Int, left: Int, top: Int, stride: Int, handler: Any, callback: Runnable) | |
Creates a PixelBufferDescriptor | |
| constructor(storage: Buffer, format: Texture.Format, type: Texture.Type) | |
Creates a PixelBufferDescriptor with some default values and no callback. | |
| constructor(storage: Buffer, format: Texture.Format, type: Texture.Type, alignment: Int) | |
Creates a PixelBufferDescriptor with some default values and no callback. | |
| constructor(storage: Buffer, format: Texture.Format, type: Texture.Type, alignment: Int, left: Int, top: Int) | |
Creates a PixelBufferDescriptor with some default values and no callback. | |
| constructor(storage: ByteBuffer, format: Texture.CompressedFormat, compressedSizeInBytes: Int) |
| Name | Summary |
|---|---|
| alignment | [main] |
| open var alignment: Int | |
| callback | [main] |
| open var callback: Runnable | |
| Callback used to destroy the buffer data. | |
| compressedFormat | [main] |
| open var compressedFormat: Texture.CompressedFormat | |
| compressedSizeInBytes | [main] |
| open var compressedSizeInBytes: Int | |
| format | [main] |
| open var format: Texture.Format | |
| handler | [main] |
| open var handler: Any | |
| left | [main] |
| open var left: Int | |
| storage | [main] |
| open var storage: Buffer | |
| stride | [main] |
| open var stride: Int | |
| top | [main] |
| open var top: Int | |
| type | [main] |
| open var type: Texture.Type |
| Name | Summary |
|---|---|
| computeDataSize | [main] |
| open fun computeDataSize(format: Texture.Format, type: Texture.Type, stride: Int, height: Int, alignment: Int): Int | |
| Helper to calculate the buffer size (in byte) needed for given parameters | |
| setCallback | [main] |
| open fun setCallback(handler: Any, callback: Runnable) | |
| Set or replace the callback called when the CPU-side data is no longer needed. |