27#ifndef EASY3D_RENDERER_OPENGL_ERROR_H
28#define EASY3D_RENDERER_OPENGL_ERROR_H
31#include <easy3d/util/logging.h>
37#define easy3d_gl_error { \
38 opengl::check_gl_error(__FILE__, __FUNCTION__, __LINE__) ; \
41#define easy3d_frame_buffer_error { \
42 opengl::check_frame_buffer_error(__FILE__, __FUNCTION__, __LINE__) ; \
45#define easy3d_log_gl_error { \
47 LOG_IF(!opengl::gl_error(log), ERROR) << "GL error: \n" \
48 << "\tfile: " << __FILE__ << "\n" \
49 << "\tline: " << __LINE__ << "\n" \
50 << "\tfunction: " << __FUNCTION__ << "\n" \
51 << "\tinfo: " << log; \
54#define easy3d_log_frame_buffer_error { \
56 LOG_IF(!opengl::frame_buffer_error(log), ERROR) << "GL error: \n" \
57 << "\tfile: " << __FILE__ << "\n" \
58 << "\tline: " << __LINE__ << "\n" \
59 << "\tfunction: " << __FUNCTION__ << "\n" \
60 << "\tinfo: " << log; \
65#define easy3d_debug_gl_error easy3d_gl_error
66#define easy3d_debug_frame_buffer_error easy3d_frame_buffer_error
67#define easy3d_debug_log_gl_error easy3d_log_gl_error
68#define easy3d_debug_log_frame_buffer_error easy3d_log_frame_buffer_error
70#define easy3d_debug_gl_error
71#define easy3d_debug_frame_buffer_error
72#define easy3d_debug_log_gl_error
73#define easy3d_debug_log_frame_buffer_error
81 bool check_gl_error(
const std::string& file,
const std::string& function,
int line);
82 bool check_frame_buffer_error(
const std::string& file,
const std::string& function,
int line);
86 bool gl_error(std::string& log);
87 bool frame_buffer_error(std::string& log);
89 void setup_gl_debug_callback();
Definition: collider.cpp:182