LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Macros
glew.hpp File Reference

Includes GL/glew.h and windows.h if _WIN32 is defined. Also defines the LIBCARNA_GLEW_INIT macro. More...

#include <LibCarna/base/Log.hpp>
#include <LibCarna/base/GL/glew.h>
+ Include dependency graph for glew.hpp:

Go to the source code of this file.

Macros

#define LIBCARNA_GLEW_INIT
 Invokes glewInit and raises an AssertionFailure if it fails.
 

Detailed Description

Includes GL/glew.h and windows.h if _WIN32 is defined. Also defines the LIBCARNA_GLEW_INIT macro.

Definition in file glew.hpp.

Macro Definition Documentation

◆ LIBCARNA_GLEW_INIT

#define LIBCARNA_GLEW_INIT
Value:
{ \
const GLenum glew_state = glewInit(); \
const auto glew_ok = ( glew_state == GLEW_OK ); \
if( glew_ok ) \
{ \
LibCarna::base::Log::instance().record( LibCarna::base::Log::debug, "GLEW initialized successfully." ); \
} \
else \
{ \
LIBCARNA_FAIL( "GLEW initialization failed (" << glewGetErrorString( glew_state ) << ", Code: " << glew_state << ")" ); \
} \
}
@ debug
Indicates messages that might be of interest when searching bugs.
Definition Log.hpp:91

Invokes glewInit and raises an AssertionFailure if it fails.

Definition at line 40 of file glew.hpp.