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

Detailed Description

Image based texture stored in GPU memory

Inheritance diagram for ImageTexture:
Texture Resource Object

Public Member Functions

 ImageTexture (const shared_ptr< Image > &img)
 
 ImageTexture (const string &filename, ImageFormat imageFormat=ImageFormat::R8G8B8A8_SRGB)
 
const auto & getImage () const
 
uint32_t getWidth () const override
 
uint32_t getHeight () const override
 
- Public Member Functions inherited from Texture
 Texture (const string &name)
 
virtual vec2 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)
 

Constructor & Destructor Documentation

ImageTexture ( const shared_ptr< Image > &  img)
explicit

Creates an ImageTexture from an existing Image

ImageTexture ( const string &  filename,
ImageFormat  imageFormat = ImageFormat::R8G8B8A8_SRGB 
)
explicit

Creates an ImageTexture from an image resource

Member Function Documentation

uint32_t getHeight ( ) const
nodiscardinlineoverridevirtual

Returns the height in pixels on the texture

Implements z0::Texture::getHeight()

const auto& getImage ( ) const
nodiscardinline

Returns the attached Image

uint32_t getWidth ( ) const
nodiscardinlineoverridevirtual

Returns the width in pixels on the texture

Implements z0::Texture::getWidth()