Carna Version 3.3.3
Loading...
Searching...
No Matches
glError.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2015 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 */
11
12#ifndef GLERROR_H_6014714286
13#define GLERROR_H_6014714286
14
24// ----------------------------------------------------------------------------------
25// GCC compatibility
26// ----------------------------------------------------------------------------------
27
28#ifndef __func__
29
35#define __func__ __FUNCTION__
36
37#endif
38
39
40
41// ----------------------------------------------------------------------------------
42// REPORT_GL_ERROR
43// ----------------------------------------------------------------------------------
44
45#ifndef NO_GL_ERROR_CHECKING
46
48
54 #define __REPORT_GL_ERROR_IMPL { \
55 const unsigned int err = glGetError(); \
56 CARNA_ASSERT_EX( err == GL_NO_ERROR, "GL Error State in " \
57 << __func__ << ": " \
58 << std::string( reinterpret_cast< const char* >( gluErrorString( err ) ) ) \
59 << " [" << err << "] (" << __FILE__ << ":" << __LINE__ << ")" ); }
60#else
61
62 #define __REPORT_GL_ERROR_IMPL
63
64#endif
65
73#define REPORT_GL_ERROR __REPORT_GL_ERROR_IMPL
74
75
76
77#endif // GLERROR_H_6014714286
Defines Carna::base::CarnaException, Carna::base::AssertionFailure.