MeshLib C++ Docs
▶
Live demo
Loading...
Searching...
No Matches
MRGLMacro.h
Go to the documentation of this file.
1
#pragma once
2
3
#if !defined( NDEBUG ) && !defined( MR_GL_NO_LOGGING )
4
#include "MRPch/MRSpdlog.h"
5
#include "
MRMesh/MRFinally.h
"
6
8
#ifdef __clang__
9
#pragma clang diagnostic push
10
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
11
#endif
12
13
#define GL_EXEC( ... ) \
14
( \
15
void(MR::detail::ScopeGuard([] \
16
{ \
17
auto error = glGetError();\
18
if ( error != 0 )\
19
spdlog::warn("GL error: {} In file: {} Line: {}", error , __FILE__ , __LINE__ );\
20
})) \
21
,##__VA_ARGS__\
22
)
23
24
#ifdef __clang__
25
#pragma clang diagnostic pop
26
#endif
27
28
#else
29
#define GL_EXEC( ... ) __VA_ARGS__
30
#endif
MRFinally.h
MRViewer
MRGLMacro.h
Generated by
1.14.0