Topaz 5.0
Topaz Game Engine
Loading...
Searching...
No Matches
tz::gpu::image_info Struct Reference

Description

Specifies creation flags for an image.

See tz::gpu::create_image for usage.

#include "resource.hpp"

Public Attributes

unsigned int width
 Width of the image, in pixels.
 
unsigned int height
 Height of the image, in pixels.
 
image_type type
 Describes the format of the image data.
 
std::span< const std::byte > data
 What initial data shall I have?
 
const char * name = "<untitled image resource>"
 What name shall I have when you're looking at me in your graphics debugger of choice? If you don't specify one, I will be named "Resource 123I" (not necessarily 123)
 
image_flag flags = static_cast<image_flag>(0)
 Any extra optional flags to specify?
 

Member Data Documentation

◆ width

unsigned int tz::gpu::image_info::width

Width of the image, in pixels.

◆ height

unsigned int tz::gpu::image_info::height

Height of the image, in pixels.

◆ type

image_type tz::gpu::image_info::type

Describes the format of the image data.

◆ data

std::span<const std::byte> tz::gpu::image_info::data

What initial data shall I have?

Note
The size of the data, in bytes, should be equal to width * height * 4 (all image_type values are 32-bit aka 4 bytes per pixel).

◆ name

const char* tz::gpu::image_info::name = "<untitled image resource>"

What name shall I have when you're looking at me in your graphics debugger of choice? If you don't specify one, I will be named "Resource 123I" (not necessarily 123)

◆ flags

image_flag tz::gpu::image_info::flags = static_cast<image_flag>(0)

Any extra optional flags to specify?