OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OpenGLShader Class Reference

#include <OpenGLShader.h>

Public Member Functions

 OpenGLShader ()=default
 
 ~OpenGLShader ()
 
bool isValid () const
 
bool load (std::string_view vertPath, std::string_view fragPath, bool openGLES)
 
bool load (const Blob &vertSource, const Blob &fragSource, bool openGLES)
 
void release ()
 
int uniformLocation (const char *name)
 
int attribLocation (const char *name)
 
void use ()
 

Private Member Functions

unsigned loadShader (const Blob &source, int type, bool openGLES)
 

Private Attributes

unsigned _id = 0
 

Detailed Description

Class for loading in and building gl shaders.

Code derived from: https://learnopengl.com/code_viewer_gh.php?code=includes/learnopengl/shader.h

Constructor & Destructor Documentation

◆ OpenGLShader()

OpenGLShader::OpenGLShader ( )
default

◆ ~OpenGLShader()

OpenGLShader::~OpenGLShader ( )

Member Function Documentation

◆ attribLocation()

int OpenGLShader::attribLocation ( const char *  name)

◆ isValid()

bool OpenGLShader::isValid ( ) const
inline

◆ load() [1/2]

bool OpenGLShader::load ( const Blob vertSource,
const Blob fragSource,
bool  openGLES 
)

◆ load() [2/2]

bool OpenGLShader::load ( std::string_view  vertPath,
std::string_view  fragPath,
bool  openGLES 
)

◆ loadShader()

unsigned OpenGLShader::loadShader ( const Blob source,
int  type,
bool  openGLES 
)
private

◆ release()

void OpenGLShader::release ( )

◆ uniformLocation()

int OpenGLShader::uniformLocation ( const char *  name)

◆ use()

void OpenGLShader::use ( )

Member Data Documentation

◆ _id

unsigned OpenGLShader::_id = 0
private

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