Lugdunum  0.1.0
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
lug::Graphics::Render::Texture Class Reference

#include <Texture.hpp>

Inheritance diagram for lug::Graphics::Render::Texture:
[legend]
Collaboration diagram for lug::Graphics::Render::Texture:
[legend]

Public Types

enum  Filter : uint8_t { Filter::Nearest, Filter::Linear }
 
enum  WrappingMode : uint8_t { WrappingMode::ClampToEdge, WrappingMode::MirroredRepeat, WrappingMode::Repeat }
 
enum  Format : uint8_t {
  Format::Undefined, Format::R8G8B8A8_UNORM, Format::R16G16_SFLOAT, Format::R16G16B16_SFLOAT,
  Format::R32G32B32A32_SFLOAT
}
 
- Public Types inherited from lug::Graphics::Resource
enum  Type : uint8_t {
  Type::Scene, Type::SceneNode, Type::Material, Type::Mesh,
  Type::Light, Type::Texture, Type::Pipeline, Type::Camera,
  Type::SkyBox
}
 Type of the resource. More...
 

Public Member Functions

 Texture (const std::string &name)
 
 Texture (const Texture &)=delete
 
 Texture (Texture &&)=delete
 
Textureoperator= (const Texture &)=delete
 
Textureoperator= (Texture &&)=delete
 
virtual ~Texture ()=default
 
uint32_t getWidth () const
 
uint32_t getHeight () const
 
Render::Texture::Format getFormat () const
 
Render::Texture::Filter getMagFilter () const
 
Render::Texture::Filter getMinFilter () const
 
Render::Texture::Filter getMipMapFilter () const
 
Render::Texture::WrappingMode getWrapS () const
 
Render::Texture::WrappingMode getWrapT () const
 
- Public Member Functions inherited from lug::Graphics::Resource
 Resource (Type type, const std::string &name)
 
 Resource (const Resource &)=delete
 
 Resource (Resource &&)=delete
 
Resourceoperator= (const Resource &)=delete
 
Resourceoperator= (Resource &&)=delete
 
virtual ~Resource ()=default
 
Type getType () const
 Returns the type of the Resource. More...
 
Handle getHandle () const
 Returns the handle of the Resource. More...
 
const std::string & getName () const
 Gets the name of the Resource. More...
 
void setName (const std::string &name)
 Sets the name of the Resource. More...
 

Static Public Member Functions

static size_t formatToSize (Render::Texture::Format format)
 

Private Attributes

uint32_t _width {0}
 
uint32_t _height {0}
 
Render::Texture::Format _format
 
Render::Texture::Filter _magFilter
 
Render::Texture::Filter _minFilter
 
Render::Texture::Filter _mipMapFilter
 
Render::Texture::WrappingMode _wrapS
 
Render::Texture::WrappingMode _wrapT
 

Friends

class ::lug::Graphics::Builder::Texture
 

Additional Inherited Members

- Protected Attributes inherited from lug::Graphics::Resource
std::string _name
 

Detailed Description

Definition at line 16 of file Texture.hpp.

Member Enumeration Documentation

◆ Filter

Enumerator
Nearest 
Linear 

Definition at line 20 of file Texture.hpp.

◆ WrappingMode

Enumerator
ClampToEdge 
MirroredRepeat 
Repeat 

Definition at line 25 of file Texture.hpp.

◆ Format

Enumerator
Undefined 
R8G8B8A8_UNORM 
R16G16_SFLOAT 
R16G16B16_SFLOAT 
R32G32B32A32_SFLOAT 

Definition at line 31 of file Texture.hpp.

Constructor & Destructor Documentation

◆ Texture() [1/3]

lug::Graphics::Render::Texture::Texture ( const std::string &  name)

Definition at line 7 of file Texture.cpp.

◆ Texture() [2/3]

lug::Graphics::Render::Texture::Texture ( const Texture )
delete

◆ Texture() [3/3]

lug::Graphics::Render::Texture::Texture ( Texture &&  )
delete

◆ ~Texture()

virtual lug::Graphics::Render::Texture::~Texture ( )
virtualdefault

Member Function Documentation

◆ operator=() [1/2]

Texture& lug::Graphics::Render::Texture::operator= ( const Texture )
delete

◆ operator=() [2/2]

Texture& lug::Graphics::Render::Texture::operator= ( Texture &&  )
delete

◆ getWidth()

uint32_t Texture::getWidth ( ) const
inline

Definition at line 1 of file Texture.inl.

◆ getHeight()

uint32_t Texture::getHeight ( ) const
inline

Definition at line 5 of file Texture.inl.

◆ getFormat()

Render::Texture::Format Texture::getFormat ( ) const
inline

Definition at line 9 of file Texture.inl.

◆ getMagFilter()

Render::Texture::Filter Texture::getMagFilter ( ) const
inline

Definition at line 13 of file Texture.inl.

◆ getMinFilter()

Render::Texture::Filter Texture::getMinFilter ( ) const
inline

Definition at line 17 of file Texture.inl.

◆ getMipMapFilter()

Render::Texture::Filter Texture::getMipMapFilter ( ) const
inline

Definition at line 21 of file Texture.inl.

◆ getWrapS()

Render::Texture::WrappingMode Texture::getWrapS ( ) const
inline

Definition at line 25 of file Texture.inl.

◆ getWrapT()

Render::Texture::WrappingMode Texture::getWrapT ( ) const
inline

Definition at line 29 of file Texture.inl.

◆ formatToSize()

size_t Texture::formatToSize ( Render::Texture::Format  format)
inlinestatic

Definition at line 33 of file Texture.inl.

Friends And Related Function Documentation

◆ ::lug::Graphics::Builder::Texture

friend class ::lug::Graphics::Builder::Texture
friend

Definition at line 17 of file Texture.hpp.

Member Data Documentation

◆ _width

uint32_t lug::Graphics::Render::Texture::_width {0}
private

Definition at line 63 of file Texture.hpp.

◆ _height

uint32_t lug::Graphics::Render::Texture::_height {0}
private

Definition at line 64 of file Texture.hpp.

◆ _format

Render::Texture::Format lug::Graphics::Render::Texture::_format
private

Definition at line 65 of file Texture.hpp.

◆ _magFilter

Render::Texture::Filter lug::Graphics::Render::Texture::_magFilter
private

Definition at line 67 of file Texture.hpp.

◆ _minFilter

Render::Texture::Filter lug::Graphics::Render::Texture::_minFilter
private

Definition at line 68 of file Texture.hpp.

◆ _mipMapFilter

Render::Texture::Filter lug::Graphics::Render::Texture::_mipMapFilter
private

Definition at line 69 of file Texture.hpp.

◆ _wrapS

Render::Texture::WrappingMode lug::Graphics::Render::Texture::_wrapS
private

Definition at line 71 of file Texture.hpp.

◆ _wrapT

Render::Texture::WrappingMode lug::Graphics::Render::Texture::_wrapT
private

Definition at line 72 of file Texture.hpp.


The documentation for this class was generated from the following files: