Module draw2d::graphics::texture_atlas[][src]

Expand description

Traits and implementations for managing a texture atlas.

Big Idea

A shader can define code like:

layout(binding = 1) uniform sampler2D textures[MAX_TEXTURES];

Which describes an array of textures. Textures in the array can all have different sizes and bindings. Individual draw calls can index into the array using uniform buffers or push constants.

The appeal is that the entire texture array only needs to be bound once for the entire frame.

Structs

At atlas’s version changes any time that the loaded textures are changed in some way.

The GPU Atlas is responsible for actually loading texture data into gpu memory.

A handle which can provide the texture index for a push constant.

A unique identifier for a texture managed by the texture atlas.

Constants

The maximum number of textures which can be managed by any given texture atlas.

Traits

A type which owns a collection of texture objects that can be bound once per frame and individually accessed in calls to vkDraw.