Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
Graphic::Resource::Image Struct Reference

#include <Image.hpp>

Public Member Functions

 Image ()=default
template<typename Callback>
 Image (const glm::uvec2 &size, Callback callback)
 Image (const std::filesystem::path &filepath)
void ToPng (std::string_view filename)

Public Attributes

uint32_t width = 0
uint32_t height = 0
int channels = 0
std::vector< glm::u8vec4 > pixels

Constructor & Destructor Documentation

◆ Image() [1/3]

Graphic::Resource::Image::Image ( )
default

◆ Image() [2/3]

template<typename Callback>
Graphic::Resource::Image::Image ( const glm::uvec2 & size,
Callback callback )
inlineexplicit

◆ Image() [3/3]

Graphic::Resource::Image::Image ( const std::filesystem::path & filepath)
inlineexplicit

Member Function Documentation

◆ ToPng()

void Graphic::Resource::Image::ToPng ( std::string_view filename)
inline

Member Data Documentation

◆ channels

int Graphic::Resource::Image::channels = 0

◆ height

uint32_t Graphic::Resource::Image::height = 0

◆ pixels

std::vector<glm::u8vec4> Graphic::Resource::Image::pixels

◆ width

uint32_t Graphic::Resource::Image::width = 0

The documentation for this struct was generated from the following file: