galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::graphics::TextureView Class Referencefinal

OpenGL 2D TextureView. More...

#include <TextureView.hpp>

+ Inheritance diagram for galaxy::graphics::TextureView:
+ Collaboration diagram for galaxy::graphics::TextureView:

Public Member Functions

 TextureView (const unsigned int parent, const unsigned int minlevel, const unsigned int numlevels, const unsigned int minlayer, const unsigned int numlayers)
 Args constructor.
 
 TextureView (TextureView &&)
 Move constructor.
 
TextureViewoperator= (TextureView &&)
 Move assignment operator.
 
virtual ~TextureView ()
 Destructor.
 
void bind () override
 Activate context.
 
void unbind () override
 Deactivate context.
 
- Public Member Functions inherited from galaxy::graphics::Texture
 Texture (Texture &&)
 Move constructor.
 
Textureoperator= (Texture &&)
 Move assignment operator.
 
virtual ~Texture ()
 Destructor.
 
TextureView make_view (const unsigned int minlevel=0, const unsigned int numlevels=1, const unsigned int minlayer=0, const unsigned int numlayers=1)
 Create a texture view.
 
void mode (const TextureMode mode)
 Set texture mode.
 
TextureMode mode () const
 Get texture mode.
 
void filter (const TextureFilter filter)
 Set filter when texture is (up/down)scaled in OpenGL.
 
TextureFilter filter () const
 Get texture filter.
 
void anisotropy (const int level)
 Set ansiotropic filtering level.
 
int anisotropy () const
 Get current anisotropy level.
 
float width () const
 Get texture width.
 
float height () const
 Get texture height.
 
unsigned int id () const
 Gets opengl handle.
 

Private Member Functions

 TextureView ()=delete
 Constructor.
 
 TextureView (const TextureView &)=delete
 Copy constructor.
 
TextureViewoperator= (const TextureView &)=delete
 Copy assignment operator.
 

Additional Inherited Members

- Protected Member Functions inherited from galaxy::graphics::Texture
 Texture ()
 Constructor.
 
- Protected Attributes inherited from galaxy::graphics::Texture
unsigned int m_id
 OpenGL id.
 
int m_width
 Cached width.
 
int m_height
 Cached height.
 
TextureMode m_mode
 Mode.
 
TextureFilter m_filter
 Filter.
 
int m_anisotropy
 Ansiotrophy level.
 

Detailed Description

OpenGL 2D TextureView.

Definition at line 20 of file TextureView.hpp.

Constructor & Destructor Documentation

◆ TextureView() [1/4]

galaxy::graphics::TextureView::TextureView ( const unsigned int parent,
const unsigned int minlevel,
const unsigned int numlevels,
const unsigned int minlayer,
const unsigned int numlayers )

Args constructor.

Parameters
parentTexture id of which to create a view from.
minlevelMipmap level.
numlevelsNumber of mipmaps to include.
minlayerSpecifies the index of the first layer to include in the view.
numlayersSpecifies the number of layers to include in the view.

Definition at line 23 of file TextureView.cpp.

◆ TextureView() [2/4]

galaxy::graphics::TextureView::TextureView ( TextureView && t)

Move constructor.

Definition at line 30 of file TextureView.cpp.

◆ ~TextureView()

galaxy::graphics::TextureView::~TextureView ( )
virtual

Destructor.

Definition at line 45 of file TextureView.cpp.

◆ TextureView() [3/4]

galaxy::graphics::TextureView::TextureView ( )
privatedelete

Constructor.

◆ TextureView() [4/4]

galaxy::graphics::TextureView::TextureView ( const TextureView & )
privatedelete

Copy constructor.

Member Function Documentation

◆ operator=() [1/2]

TextureView & galaxy::graphics::TextureView::operator= ( TextureView && t)

Move assignment operator.

Definition at line 35 of file TextureView.cpp.

+ Here is the call graph for this function:

◆ bind()

void galaxy::graphics::TextureView::bind ( )
overridevirtual

Activate context.

Implements galaxy::graphics::Texture.

Definition at line 50 of file TextureView.cpp.

◆ unbind()

void galaxy::graphics::TextureView::unbind ( )
overridevirtual

Deactivate context.

Implements galaxy::graphics::Texture.

Definition at line 55 of file TextureView.cpp.

◆ operator=() [2/2]

TextureView & galaxy::graphics::TextureView::operator= ( const TextureView & )
privatedelete

Copy assignment operator.


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