26#if FF_HAS(ENABLE_GL_DEBUG)
28 enum class DebugLabelFor
42 void set_gl_debug_label(DebugLabelFor type, GLuint
object,
const std::string& label);
43 void set_gl_debug_label(DebugLabelFor type, GLuint
object, std::string_view label);
46 #define SET_DEBUG_LABEL(ID, FOR) set_gl_debug_label(FOR, ID, debug_label)
47 #define SET_DEBUG_LABEL_NAMED(ID, FOR, NAME) set_gl_debug_label(FOR, ID, NAME)
51 struct ScopedDebugGroup
53 explicit ScopedDebugGroup(
const std::string& message,
unsigned int id=0);
54 explicit ScopedDebugGroup(std::string_view message,
unsigned int id=0);
57 ScopedDebugGroup(ScopedDebugGroup&&) =
delete;
58 ScopedDebugGroup(
const ScopedDebugGroup&) =
delete;
59 void operator=(ScopedDebugGroup&&) =
delete;
60 void operator=(
const ScopedDebugGroup&) =
delete;
63 #define CONCAT_IMPL(x, y) x##y
64 #define CONCAT(x, y) CONCAT_IMPL(x, y)
65 #define SCOPED_DEBUG_GROUP(TEXT) [[maybe_unused]] const ScopedDebugGroup CONCAT(sc, __LINE__){TEXT}
72 #define SET_DEBUG_LABEL(ID, FOR) opengl_nop()
73 #define SET_DEBUG_LABEL_NAMED(ID, FOR, NAME) opengl_nop()
75 #define SCOPED_DEBUG_GROUP(TEXT) opengl_nop()
void setup_opengl_debug()
void destroy_vertex_array(u32 vao)
GLuint gluint_from_int(int i)
GLsizei glsizei_from_sizet(std::size_t t)
void set_gl_viewport(const Size &sz)
void destroy_buffer(u32 vbo)
GLsizeiptr glsizeiptr_from_sizet(std::size_t t)
u32 create_vertex_array()
GLenum glenum_from_int(int i)
constexpr void opengl_nop()