VAPOR3 3.9.4
Public Member Functions | List of all members
VAPoR::Shader Class Reference

Provides a C++ interface to the OpenGL shader construct. More...

#include <Shader.h>

Inheritance diagram for VAPoR::Shader:
Wasp::MyBase

Public Member Functions

 Shader (unsigned int type)
 
 ~Shader ()
 
int CompileFromSource (const std::string &source)
 
std::string GetLog () const
 Calls glGetShaderInfoLog.
 
unsigned int GetID () const
 
unsigned int GetType () const
 
bool WasCompilationSuccessful () const
 
- Public Member Functions inherited from Wasp::MyBase
 MyBase ()
 
const string & getClassName () const
 

Additional Inherited Members

- Public Types inherited from Wasp::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 
- Static Public Member Functions inherited from Wasp::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message.
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code.
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code.
 
static int GetErrCode ()
 Retrieve the current error code.
 
static void SetErrMsgCB (ErrMsgCB_T cb)
 
static ErrMsgCB_T GetErrMsgCB ()
 
static void SetErrMsgFilePtr (FILE *fp)
 
static const FILE * SetErrMsgFilePtr ()
 
static void SetDiagMsg (const char *format,...)
 Record a formatted diagnostic message.
 
static const char * GetDiagMsg ()
 
static void SetDiagMsgCB (DiagMsgCB_T cb)
 
static DiagMsgCB_T GetDiagMsgCB ()
 
static void SetDiagMsgFilePtr (FILE *fp)
 
static bool EnableErrMsg (bool enable)
 
static bool GetEnableErrMsg ()
 
- Static Public Attributes inherited from Wasp::MyBase
static char * ErrMsg
 
static int ErrCode
 
static int ErrMsgSize
 
static FILE * ErrMsgFilePtr
 
static ErrMsgCB_T ErrMsgCB
 
static char * DiagMsg
 
static int DiagMsgSize
 
static FILE * DiagMsgFilePtr
 
static DiagMsgCB_T DiagMsgCB
 
static bool Enabled
 
- Protected Member Functions inherited from Wasp::MyBase
void SetClassName (const string &name)
 

Detailed Description

Provides a C++ interface to the OpenGL shader construct.

Author
Stanislaw Jaroszynski
Date
August, 2018

Definition at line 16 of file Shader.h.

Constructor & Destructor Documentation

◆ Shader()

VAPoR::Shader::Shader ( unsigned int  type)

Allocate a new C++ shader and specify the type. An OpenGL shader is not allocated until it is compiled

Parameters
[in]typeOpenGL shader type enum

◆ ~Shader()

VAPoR::Shader::~Shader ( )

Member Function Documentation

◆ CompileFromSource()

int VAPoR::Shader::CompileFromSource ( const std::string &  source)
Parameters
[in]sourceGLSL source code
Return values
1is returned on success
-1is returned on failure

◆ GetID()

unsigned int VAPoR::Shader::GetID ( ) const

◆ GetLog()

std::string VAPoR::Shader::GetLog ( ) const

Calls glGetShaderInfoLog.

◆ GetType()

unsigned int VAPoR::Shader::GetType ( ) const

◆ WasCompilationSuccessful()

bool VAPoR::Shader::WasCompilationSuccessful ( ) const

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