summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/debugging.hpp
blob: 5321858624c80638a554972bcba9bc5b27b547b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef MBGL_GL_DEBUG_MESSAGES
#define MBGL_GL_DEBUG_MESSAGES

#include <string>

#if defined(DEBUG)
#define __MBGL_DEBUG_GROUP_NAME2(counter) __MBGL_DEBUG_GROUP_##counter
#define __MBGL_DEBUG_GROUP_NAME(counter) __MBGL_DEBUG_GROUP_NAME2(counter)
#define MBGL_DEBUG_GROUP(string) ::mbgl::gl::debugging::group __MBGL_DEBUG_GROUP_NAME(__LINE__)(string);
#else
#define MBGL_DEBUG_GROUP(string)
#endif

namespace mbgl {
namespace gl {
namespace debugging {

void enable();

struct group {
    group(const std::string&);
    ~group();
};

} // namespace debugging
} // namespace gl
} // namespace mbgl

#endif