Beatmup
Beatmup::GL::GLException Class Reference

GPU exception. More...

#include <bgl.h>

Inheritance diagram for Beatmup::GL::GLException:
Beatmup::Exception

Public Member Functions

 GLException (const char *info, int errCode)
 
 GLException (const char *info)
 
 GLException (const std::string &info)
 
- Public Member Functions inherited from Beatmup::Exception
virtual const char * what () const NOEXCEPT override
 

Static Public Member Functions

static void check (const std::string &info)
 

Additional Inherited Members

- Protected Member Functions inherited from Beatmup::Exception
 Exception (const char *message)
 
template<typename ... Args>
 Exception (const char *message, const Args &... args)
 

Detailed Description

GPU exception.

Definition at line 56 of file bgl.h.

Constructor & Destructor Documentation

◆ GLException() [1/3]

Beatmup::GL::GLException::GLException ( const char *  info,
int  errCode 
)
inline

Definition at line 58 of file bgl.h.

58 : Exception("GL error %x: %s", errCode, info) {}
Exception(const char *message)
Definition: exception.h:41

◆ GLException() [2/3]

Beatmup::GL::GLException::GLException ( const char *  info)
inline

Definition at line 59 of file bgl.h.

59 : Exception("GL error %x: %s", glGetError(), info) {}

◆ GLException() [3/3]

Beatmup::GL::GLException::GLException ( const std::string &  info)
inline

Definition at line 60 of file bgl.h.

60 : GLException(info.c_str()) {}
GLException(const char *info, int errCode)
Definition: bgl.h:58

Member Function Documentation

◆ check()

static void Beatmup::GL::GLException::check ( const std::string &  info)
inlinestatic

Definition at line 62 of file bgl.h.

62  {
63  GLuint err = glGetError();
64  if (err != GL_NO_ERROR)
65  throw GLException(info.c_str(), err);
66  }

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