ImFusion SDK 4.3
ImFusion::GL::Debug Namespace Reference

The GL::Debug namespace contains functions and class to help with debugging OpenGL calls. More...

Detailed Description

The GL::Debug namespace contains functions and class to help with debugging OpenGL calls.

Most functions except for check() and checkAndThrow() rely on the KHR_debug extension. All functions only annotate the OpenGL command stream but don't effect the rendering in any way. For more information, see: https://www.opengl.org/wiki/Debug_Output

Classes

class  Group
 The Group class allows to group a set of OpenGL calls together. More...
 
class  OpenGlException
 Specialization of std::runtime_error that also stores the original OpenGL error code. More...
 

Typedefs

using MessageCallback
 Typedef for a debug callback emitted OpenGl.
 

Enumerations

enum class  MessageSource {
  API = 0x8246 , WindowSystem = 0x8247 , ShaderCompiler = 0x8248 , ThirdParty = 0x8249 ,
  Application = 0x824A , Other = 0x824B
}
 Enumeration to describe the source of an OpenGL debug message callback. More...
 
enum class  MessageType {
  Error = 0x824C , DeprecatedBehavior = 0x824D , UndefinedBehavior = 0x824E , Portability = 0x824F ,
  Performance = 0x8250 , Marker = 0x8268 , PushGroup = 0x8269 , PopGroup = 0x826A ,
  Other = 0x8250
}
 Enumeration to describe the type of the OpenGL debug message callback. More...
 
enum class  MessageSeverity { High = 0x9146 , Medium = 0x9147 , Low = 0x9148 , Notification = 0x826B }
 Enumeration to describe the severity of the OpenGL debug message callback. More...
 
enum class  Error {
  None = 0 , InvalidEnum = 0x0500 , InvalidValue = 0x0501 , InvalidOperation = 0x0502 ,
  InvalidFramebufferOp = 0x0506 , OutOfMemory = 0x0505 , StackUnderflow = 0x0504 , StackOverflow = 0x0503
}
 Enumeration of all error flag types that OpenGL supports. More...
 
enum class  FramebufferStatus {
  Complete = 0x8CD5 , FramebufferUndefined = 0x8219 , IncompleteAttachment = 0x8CD6 , MissingAttachment = 0x8CD7 ,
  IncompleteDrawBuffer = 0x8CDB , IncompleteReadBuffer = 0x8CDC , Unsupported = 0x8CDD , IncompleteMultisample = 0x8D56 ,
  IncompleteLayerTargets = 0x8DA8
}
 Enumeration of all OpenGL Framebuffer status/error flag types. More...
 

Functions

void defaultMessageCallback (Debug::MessageSource source, Debug::MessageType type, uint32_t id, Debug::MessageSeverity severity, const std::string &message)
 The default OpenGL debug message callback used by ImFusionGL.
 
void setMessageCallback (const MessageCallback &mc, bool synchronous)
 Sets the OpenGL debug message callback to use for the current context.
 
Error check (bool log=true, const char *file=0, int line=-1)
 Convenience function wrapping glGetError() to check and return the OpenGL context error flag.
 
void checkAndThrow (bool log=true, const char *file=0, int line=-1)
 Implements the same functionality as check() but throws an OpenGlException in case of an error.
 
FramebufferStatus checkFramebufferStatus (bool log=true)
 Convenience function wrapping glCheckFramebufferStatus() to check the completeness of the currently bound framebuffer.
 
void insertMessage (const std::string &message)
 Inserts a message into the OpenGL command stream.
 
Search Tab / S to search, Esc to close