OGLplus (0.52.0) a C++ wrapper for OpenGL

oglplus::MissingFunction Class Reference

Exception class for situations when a pointer to a GL function is invalid. More...

#include </home/chochlik/devel/oglplus/include/oglplus/error/glfunc.hpp>

Inheritance diagram for oglplus::MissingFunction:
Collaboration diagram for oglplus::MissingFunction:

Public Member Functions

ErrorCode Code (void) const
 Returns the GL error code related to the error.
 
const char * SourceFile (void) const
 Returns the name of the source file where the error occured. More...
 
const char * SourceFunc (void) const
 Returns the name of the function where the error occured. More...
 
unsigned SourceLine (void) const
 Returns the line of the source file where the error occured. More...
 
const char * GLFunc (void) const
 Returns the name of the GL function related to the error. More...
 
GLenum EnumParam (void) const
 Returns the value of the enumeration parameter related to the error. More...
 
const char * EnumParamName (void) const
 Returns the name of the enumeration parameter related to the error. More...
 
GLint Index (void) const
 Returns the index parameter related to the error. More...
 
virtual GLfloat Value (void) const
 Returns the value parameter related to the error.
 
virtual GLfloat Limit (void) const
 Returns the limit value related to the error.
 
virtual GLenum BindTarget (void) const
 Returns the bind target.
 
virtual const char * TargetName (void) const
 Returns the bind target name.
 
virtual GLenum ObjectType (void) const
 Returns the object type. More...
 
virtual const char * ObjectTypeName (void) const
 Returns the object type name. More...
 
virtual GLint ObjectName (void) const
 Returns the object instance GL name. More...
 
virtual const std::string & ObjectDesc (void) const
 Returns the object instance description. More...
 
virtual GLenum SubjectType (void) const
 Returns the subject type. More...
 
virtual const char * SubjectTypeName (void) const
 Returns the subject class name. More...
 
virtual GLint SubjectName (void) const
 Returns the subject GL name. More...
 
virtual const std::string & SubjectDesc (void) const
 Returns the subject textual description. More...
 
virtual const char * Identifier (void) const
 Returns the identifier of a GPU program variable. More...
 
virtual const StringLog (void) const
 Returns a log string associated with the error. More...
 

Detailed Description

Exception class for situations when a pointer to a GL function is invalid.

OGLplus optionally (based on the value of the #OGLPLUS_NO_GLFUNC_CHECKS compile-time switch) checks, if pointers to OpenGL functions are valid (i.e. not nullptr). OpenGL functions are usually called through pointers, when using a library such as GLEW, which tries to find and get the addresses of GL functions from the GL library dynamically at run-time. Sometimes the pointers to several of the functions remain uninitialized and usually result in a memory violation and program termination if called.

The MissingFunction exception class indicates that the usage of such uninitialized function pointer was detected at run-time and allows the application to terminate more gracefully.

See Also
#OGLPLUS_NO_GLFUNC_CHECKS

Member Function Documentation

GLenum oglplus::Error::EnumParam ( void  ) const
inherited

Returns the value of the enumeration parameter related to the error.

This function returns the value of the main enumeration parameter passed to the failed OpenGL function

The result of this function is also influenced by the #OGLPLUS_ERROR_NO_GL_SYMBOL preprocessor configuration option. If set to zero this function behaves as described above, otherwise it returns zero.

const char* oglplus::Error::EnumParamName ( void  ) const
inherited

Returns the name of the enumeration parameter related to the error.

This function returns the name of the main enumeration parameter passed to the failed OpenGL function

The result of this function is also influenced by the #OGLPLUS_ERROR_NO_GL_SYMBOL preprocessor configuration option. If set to zero this function behaves as described above, otherwise it returns nullptr.

const char* oglplus::Error::GLFunc ( void  ) const
inherited

Returns the name of the GL function related to the error.

This function returns the name of the failed OpenGL function (without the gl prefix) which is related to the error.

The result of this function is also influenced by the #OGLPLUS_ERROR_NO_GL_FUNC preprocessor configuration option. If set to zero this function behaves as described above, otherwise it returns nullptr.

virtual const char* oglplus::Error::Identifier ( void  ) const
virtualinherited

Returns the identifier of a GPU program variable.

If the error is related to a GPU program variable (vertex attrib, uniform, subroutine, etc.) then this function returns a C string storing the identifier of the variable. Otherwise the result is nullptr.

Reimplemented in oglplus::ProgVarError.

GLint oglplus::Error::Index ( void  ) const
inherited

Returns the index parameter related to the error.

This function returns the value of the index parameter passed to the failed OpenGL function if applicable. If no index value is available then this function return a negative integer.

The result of this function is also influenced by the #OGLPLUS_ERROR_NO_GL_SYMBOL preprocessor configuration option. If set to zero this function behaves as described above, otherwise it returns a negative integer.

virtual const String& oglplus::Error::Log ( void  ) const
virtualinherited

Returns a log string associated with the error.

If the error was caused by a process (like shader compilation, program linking or validation, etc.) which creates a textual log and it is available then it is returned by this function. Otherwise the result is an empty String.

Reimplemented in oglplus::ProgramBuildError.

virtual const std::string& oglplus::Error::ObjectDesc ( void  ) const
virtualinherited

Returns the object instance description.

If the error is related to a GL object, then a std::string storing object description is returned. Otherwise the result is an empty std::string.

Reimplemented in oglplus::ObjectError.

virtual GLint oglplus::Error::ObjectName ( void  ) const
virtualinherited

Returns the object instance GL name.

If the error is related to a GL object, then the numeric GL name of the object is returned. Otherwise the result is a negative integer.

Reimplemented in oglplus::ObjectError, and oglplus::ProgVarError.

virtual GLenum oglplus::Error::ObjectType ( void  ) const
virtualinherited

Returns the object type.

If the error is related to a GL object, then an object type enumeration value is returned. Otherwise the result is zero.

Reimplemented in oglplus::ObjectError.

virtual const char* oglplus::Error::ObjectTypeName ( void  ) const
virtualinherited

Returns the object type name.

If the error is related to a GL object, then a C string storing object type name is returned. Otherwise the result is nullptr.

Reimplemented in oglplus::ProgVarError, and oglplus::ObjectError.

const char* oglplus::Error::SourceFile ( void  ) const
inherited

Returns the name of the source file where the error occured.

The result of this function is also influenced by the #OGLPLUS_ERROR_NO_FILE preprocessor configuration option. If set to zero this function behaves as described above, otherwise it returns nullptr.

const char* oglplus::Error::SourceFunc ( void  ) const
inherited

Returns the name of the function where the error occured.

The result of this function is also influenced by the #OGLPLUS_ERROR_NO_FUNC preprocessor configuration option. If set to zero this function behaves as described above, otherwise it returns nullptr.

unsigned oglplus::Error::SourceLine ( void  ) const
inherited

Returns the line of the source file where the error occured.

The result of this function is also influenced by the #OGLPLUS_ERROR_NO_LINE preprocessor configuration option. If set to zero this function behaves as described above, otherwise it returns zero.

virtual const std::string& oglplus::Error::SubjectDesc ( void  ) const
virtualinherited

Returns the subject textual description.

If the error is related to a pair of GL objects, then a std::string storing the secondary object description is returned. Otherwise the result is an empty std::string.

virtual GLint oglplus::Error::SubjectName ( void  ) const
virtualinherited

Returns the subject GL name.

If the error is related to a pair of GL objects, then the numeric GL name of the secondary object is returned. Otherwise the result is a negative integer.

virtual GLenum oglplus::Error::SubjectType ( void  ) const
virtualinherited

Returns the subject type.

If the error is related to a pair of GL objects, then an object type enumeration value is returned. Otherwise the result is zero.

virtual const char* oglplus::Error::SubjectTypeName ( void  ) const
virtualinherited

Returns the subject class name.

If the error is related a pair of GL objects, then a C string storing secondary object type name is returned. Otherwise the result is nullptr.


The documentation for this class was generated from the following file:
  • /home/chochlik/devel/oglplus/include/oglplus/error/glfunc.hpp

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).