summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/debugging.hpp
blob: fe363701ad417b881c8ca1323ac7868ad296e88b (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
#pragma once

#include <string>

namespace mbgl {
namespace gl {
namespace debugging {

void enable();

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

#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 debugging
} // namespace gl
} // namespace mbgl