Class Texture
A 2D image stored in GPU memory.
Constructors
Name | Description |
this
(size, usage, shaderStage)
|
Initialize a new Texture.
|
this
(name, size, usage, shaderStage)
|
Initialize a new named Texture.
|
this
(size, bindingLocation, usage, shaderStage)
|
Initialize a new Texture.
|
this
(name, size, bindingLocation, usage, shaderStage)
|
Initialize a new named Texture.
|
this
(size, data, bindingLocation, usage, shaderStage)
|
Initialize a new Texture with initial data.
|
this
(name, size, data, bindingLocation, usage, shaderStage)
|
Initialize a new named Texture with initial data.
|
Fields
Name | Type | Description |
defaultUsage
|
const(gfx.graal.image.ImageUsage) | Default value of a Texture's usage .
|
format
|
const(gfx.graal.format.Format) | Data format of a Texture's data .
|
usage
|
const(gfx.graal.image.ImageUsage) | Manner in which this Texture will be used. Defaults to ImageUsage.sampled | ImageUsage.transferDst .
|
onChanged
|
Event!(const(ubyte)[]) | Fired when this BindingDescriptor's data changes.
|
Properties
Name | Type | Description |
data [get]
|
const(ubyte[]) | Texture data.
|
dimensions [get]
|
Size | Size of this Texture, in pixels.
|
initialized [get]
|
bool | Whether this Shader has been successfully initialized.
|
size [get]
|
ulong | |
bindingLocation [get]
|
uint | Descriptor binding location, e.g. layout(binding = 0) in GLSL.
|
dirty [get]
|
bool | Whether this uniform's data is new or changed and needs to be uploaded to the GPU.
|
shaderStage [get]
|
gfx.graal.pipeline.ShaderStage | Which shader stages this descriptor is going to be referenced.
|
Methods
Name | Description |
initialize
(device)
|
Initialize this Texture.
|
resize
(size)
|
Resize this Texture.
|
update
(data)
|
Update this Texture's data.
|