ManaPlus
Public Member Functions | Protected Attributes
Shader Class Reference

#include <shader.h>

Inheritance diagram for Shader:
Resource MemoryCounter

Public Member Functions

 Shader (const unsigned int id)
 
 ~Shader ()
 
unsigned int getShaderId () const
 
- Public Member Functions inherited from Resource
 Resource ()
 
 ~Resource ()
 
virtual void incRef ()
 
virtual void decRef ()
 
int calcMemoryLocal () const
 
std::string getCounterName () const
 
- Public Member Functions inherited from MemoryCounter
 MemoryCounter ()
 
virtual ~MemoryCounter ()
 
int calcMemory (const int level) const
 
virtual int calcMemoryChilds (const int level) const
 

Protected Attributes

unsigned int mShaderId
 

Additional Inherited Members

- Data Fields inherited from Resource
time_t mTimeStamp
 
std::string mIdPath
 
std::string mSource
 
unsigned int mRefCount
 
bool mProtected
 
bool mNotCount
 

Detailed Description

Definition at line 29 of file shader.h.

Constructor & Destructor Documentation

◆ Shader()

Shader::Shader ( const unsigned int  id)
explicit

Definition at line 30 of file shader.cpp.

30  :
31  Resource(),
32  mShaderId(id)
33 {
34 }
Resource()
Definition: resource.h:40
unsigned int mShaderId
Definition: shader.h:42

◆ ~Shader()

Shader::~Shader ( )

Definition at line 36 of file shader.cpp.

37 {
38  if (mShaderId != 0U)
39  mglDeleteShader(mShaderId);
40 }

References mShaderId.

Member Function Documentation

◆ getShaderId()

unsigned int Shader::getShaderId ( ) const
inline

Definition at line 38 of file shader.h.

39  { return mShaderId; }

References mShaderId.

Referenced by ShadersManager::createProgram().

Field Documentation

◆ mShaderId

unsigned int Shader::mShaderId
protected

Definition at line 42 of file shader.h.

Referenced by getShaderId(), and ~Shader().


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