ZeroZero Game Engine  v0.0
A 3D game engine using Vulkan & Jolt
Public Member Functions | Static Public Member Functions | List of all members
Image Class Reference

Detailed Description

A bitmap resource, stored in GPU memory.

Inheritance diagram for Image:
Resource Object

Public Member Functions

auto getWidth () const
 
auto getHeight () const
 
auto getSize () const
 
- Public Member Functions inherited from Resource
auto getId () const
 
const auto & getName () const
 
string toString () const override
 
virtual shared_ptr< Resource > duplicate () const
 
- Public Member Functions inherited from Object
void connect (const Signal::signal &name, const Signal::Handler &handler)
 
void connect (const Signal::signal &name, const function< void ()> &handler)
 
void emit (const Signal::signal &name, void *params=nullptr)
 

Static Public Member Functions

static shared_ptr< Image > load (const string &filepath, ImageFormat imageFormat=ImageFormat::R8G8B8A8_SRGB)
 
static shared_ptr< Image > load (const void *data, uint64_t dataSize, ImageFormat imageFormat=ImageFormat::R8G8B8A8_SRGB)
 

Member Function Documentation

auto getHeight ( ) const
nodiscardinline

Returns the height in pixels

auto getSize ( ) const
nodiscardinline

Returns the size in pixels

auto getWidth ( ) const
nodiscardinline

Returns the width in pixels

static shared_ptr<Image> load ( const string &  filepath,
ImageFormat  imageFormat = ImageFormat::R8G8B8A8_SRGB 
)
static

Load a bitmap from file.
Support JPEG, PNG, DDS and KTX2 formats.

static shared_ptr<Image> load ( const void *  data,
uint64_t  dataSize,
ImageFormat  imageFormat = ImageFormat::R8G8B8A8_SRGB 
)
static

Load a bitmap from memory.
Support JPEG & PNG formats.