Lugdunum  0.1.0
Classes | Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
lug::Graphics::Builder::Texture Class Reference

#include <Texture.hpp>

Collaboration diagram for lug::Graphics::Builder::Texture:
[legend]

Classes

struct  Layer
 

Public Types

enum  Type { Type::Texture2D, Type::CubeMap }
 

Public Member Functions

 Texture (Renderer &renderer)
 
 Texture (const Texture &)=delete
 
 Texture (Texture &&)=delete
 
Textureoperator= (const Texture &)=delete
 
Textureoperator= (Texture &&)=delete
 
 ~Texture ()
 
void setName (const std::string &name)
 Sets the name. More...
 
void setType (Type type)
 
void setMipLevels (uint32_t mipLevels)
 
void setMagFilter (Render::Texture::Filter magFilter)
 
void setMinFilter (Render::Texture::Filter minFilter)
 
void setMipMapFilter (Render::Texture::Filter mipMapFilter)
 
void setWrapS (Render::Texture::WrappingMode wrapS)
 
void setWrapT (Render::Texture::WrappingMode wrapT)
 
void setWrapW (Render::Texture::WrappingMode wrapW)
 
bool addLayer (const std::string &filename, bool hdr=false)
 
bool addLayer (uint32_t width, uint32_t height, Render::Texture::Format format, const unsigned char *data=nullptr)
 
Resource::SharedPtr< Render::Texturebuild ()
 

Protected Attributes

Renderer_renderer
 
std::string _name
 
Type _type {Type::Texture2D}
 
uint32_t _width {0}
 
uint32_t _height {0}
 
Render::Texture::Format _format {Render::Texture::Format::Undefined}
 
uint32_t _mipLevels {1}
 
Render::Texture::Filter _magFilter {Render::Texture::Filter::Nearest}
 
Render::Texture::Filter _minFilter {Render::Texture::Filter::Nearest}
 
Render::Texture::Filter _mipMapFilter {Render::Texture::Filter::Nearest}
 
Render::Texture::WrappingMode _wrapS {Render::Texture::WrappingMode::ClampToEdge}
 
Render::Texture::WrappingMode _wrapT {Render::Texture::WrappingMode::ClampToEdge}
 
Render::Texture::WrappingMode _wrapW {Render::Texture::WrappingMode::ClampToEdge}
 
std::vector< Layer_layers
 

Friends

Resource::SharedPtr< lug::Graphics::Render::Texturelug::Graphics::Vulkan::Builder::Texture::build (const ::lug::Graphics::Builder::Texture &)
 

Detailed Description

Definition at line 17 of file Texture.hpp.

Member Enumeration Documentation

◆ Type

Enumerator
Texture2D 
CubeMap 

Definition at line 25 of file Texture.hpp.

Constructor & Destructor Documentation

◆ Texture() [1/3]

lug::Graphics::Builder::Texture::Texture ( Renderer renderer)
explicit

Definition at line 28 of file Texture.cpp.

◆ Texture() [2/3]

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

◆ Texture() [3/3]

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

◆ ~Texture()

lug::Graphics::Builder::Texture::~Texture ( )

Definition at line 30 of file Texture.cpp.

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ setName()

void lug::Graphics::Builder::Texture::setName ( const std::string &  name)

Sets the name.

Parameters
[in]nameThe name of the mesh.

◆ setType()

void Texture::setType ( Type  type)
inline

Definition at line 5 of file Texture.inl.

◆ setMipLevels()

void Texture::setMipLevels ( uint32_t  mipLevels)
inline

Definition at line 9 of file Texture.inl.

◆ setMagFilter()

void Texture::setMagFilter ( Render::Texture::Filter  magFilter)
inline

Definition at line 13 of file Texture.inl.

◆ setMinFilter()

void Texture::setMinFilter ( Render::Texture::Filter  minFilter)
inline

Definition at line 17 of file Texture.inl.

◆ setMipMapFilter()

void Texture::setMipMapFilter ( Render::Texture::Filter  mipMapFilter)
inline

Definition at line 21 of file Texture.inl.

◆ setWrapS()

void Texture::setWrapS ( Render::Texture::WrappingMode  wrapS)
inline

Definition at line 25 of file Texture.inl.

◆ setWrapT()

void Texture::setWrapT ( Render::Texture::WrappingMode  wrapT)
inline

Definition at line 29 of file Texture.inl.

◆ setWrapW()

void Texture::setWrapW ( Render::Texture::WrappingMode  wrapW)
inline

Definition at line 33 of file Texture.inl.

◆ addLayer() [1/2]

bool lug::Graphics::Builder::Texture::addLayer ( const std::string &  filename,
bool  hdr = false 
)

Definition at line 98 of file Texture.cpp.

◆ addLayer() [2/2]

bool lug::Graphics::Builder::Texture::addLayer ( uint32_t  width,
uint32_t  height,
Render::Texture::Format  format,
const unsigned char *  data = nullptr 
)

Definition at line 61 of file Texture.cpp.

◆ build()

Resource::SharedPtr< Render::Texture > lug::Graphics::Builder::Texture::build ( )

Definition at line 37 of file Texture.cpp.

Friends And Related Function Documentation

◆ lug::Graphics::Vulkan::Builder::Texture::build

Member Data Documentation

◆ _renderer

Renderer& lug::Graphics::Builder::Texture::_renderer
protected

Definition at line 64 of file Texture.hpp.

◆ _name

std::string lug::Graphics::Builder::Texture::_name
protected

Definition at line 66 of file Texture.hpp.

◆ _type

Type lug::Graphics::Builder::Texture::_type {Type::Texture2D}
protected

Definition at line 68 of file Texture.hpp.

◆ _width

uint32_t lug::Graphics::Builder::Texture::_width {0}
protected

Definition at line 70 of file Texture.hpp.

◆ _height

uint32_t lug::Graphics::Builder::Texture::_height {0}
protected

Definition at line 71 of file Texture.hpp.

◆ _format

Render::Texture::Format lug::Graphics::Builder::Texture::_format {Render::Texture::Format::Undefined}
protected

Definition at line 72 of file Texture.hpp.

◆ _mipLevels

uint32_t lug::Graphics::Builder::Texture::_mipLevels {1}
protected

Definition at line 74 of file Texture.hpp.

◆ _magFilter

Render::Texture::Filter lug::Graphics::Builder::Texture::_magFilter {Render::Texture::Filter::Nearest}
protected

Definition at line 76 of file Texture.hpp.

◆ _minFilter

Render::Texture::Filter lug::Graphics::Builder::Texture::_minFilter {Render::Texture::Filter::Nearest}
protected

Definition at line 77 of file Texture.hpp.

◆ _mipMapFilter

Render::Texture::Filter lug::Graphics::Builder::Texture::_mipMapFilter {Render::Texture::Filter::Nearest}
protected

Definition at line 78 of file Texture.hpp.

◆ _wrapS

Render::Texture::WrappingMode lug::Graphics::Builder::Texture::_wrapS {Render::Texture::WrappingMode::ClampToEdge}
protected

Definition at line 80 of file Texture.hpp.

◆ _wrapT

Render::Texture::WrappingMode lug::Graphics::Builder::Texture::_wrapT {Render::Texture::WrappingMode::ClampToEdge}
protected

Definition at line 81 of file Texture.hpp.

◆ _wrapW

Render::Texture::WrappingMode lug::Graphics::Builder::Texture::_wrapW {Render::Texture::WrappingMode::ClampToEdge}
protected

Definition at line 82 of file Texture.hpp.

◆ _layers

std::vector<Layer> lug::Graphics::Builder::Texture::_layers
protected

Definition at line 84 of file Texture.hpp.


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