[][src]Module bedrock::resources

Vulkan Resources

(以下メモ)

バッファの作成

BufferDescで作成する

This example is not tested
let buffer = BufferDesc::new(4 * 4 * 3, BufferUsage::VERTEX_BUFFER.transfer_dest()).crete(&device)?;

newからcreateまでにメソッドチェーンを用いて以下のようなバッファの詳細を指定できる。

イメージの作成

ImageDescで作成する

This example is not tested
let image = ImageDesc::new(&Extent2D(128, 128), VK_FORMAT_R8G8B8A8_UNORM, ImageUsage::SAMPLED.color_attachment(), ImageLayout::General)
	.create(&device)?;

ImageDesc::newの第一引数に

を生成するようになる。 newからcreateまでにメソッドチェーンを用いて以下のようなイメージの詳細を指定できる。

BufferUsageの種類

BufferUsageはメソッドチェーンを利用してビットフラグを指定する。メソッド名は定数名をすべて小文字にしたもの。

This example is not tested
BufferUsage::VERTEX_BUFFER.transfer_dest()

入力/利用形態系

転送系

ImageUsageの種類

ImageUsageもメソッドチェーンを利用してビットフラグを指定する。

This example is not tested
ImageUsage::SAMPLED.color_attachment()

シェーダ入力系

出力系

転送系

その他

Structs

AspectMask

Bitmask specifying which aspects of an image are included in a view

Buffer

Opaque handle to a buffer object(constructed via BufferDesc)

BufferDesc

Builder structure specifying the parameters of a newly created buffer object

BufferUsage

Bitmask specifying allowed usage of a buffer

BufferView

Opaque handle to a buffer view object

ComponentMapping

Structure specifying a color component mapping

DeviceMemory

Opaque handle to a device memory object

Image

Opaque handle to a image object(constructed via ImageDesc)

ImageDesc

Builder structure specifying the parameters of a newly created image object

ImageFlags

Bitmask specifying additional parameters of an image

ImageSubresourceRange

Structure specifying a image subresource range

ImageUsage

Bitmask specifying intended usage of an image

ImageView

Opaque handle to a image view object

MappedMemoryRange

Specifies the block of mapped memory in a DeviceMemory

Sampler

Opaque handle to a sampler object

SamplerBuilder

Builder object for constructing the sampler object

Enums

AddressingMode

Specify behavior of sampling with texture coordinates outside an image

BorderColor

Specify border color used for texture lookups

BufferSparseBinding

Bitset specifying additional parameters of a buffer

ComponentSwizzle

Specify how a component is swizzled

FilterMode

Specify filter used for texture lookups

ImageCell
ImageLayout

Layouts of image and image subresources

MipmapFilterMode

Specify mipmap mode used for texture lookups

Traits

ImageSize

Image Dimension by corresponding extent type

MemoryBound

[feature = "Implements"] Common operations for memory bound objects