]> git.sesse.net Git - casparcg/blobdiff - common/gl/gl_check.h
[logging] Suppress the logging of full path names in stack traces so that only the...
[casparcg] / common / gl / gl_check.h
index 2ba7fa0039f9f1d212f2203d1ddcf27c7f94a335..f6ceb852571c2fe5c923e68b2b0765500895bc12 100644 (file)
@@ -33,21 +33,21 @@ struct ogl_invalid_enum                                                     : virtual ogl_exception{};
 struct ogl_invalid_value                                               : virtual ogl_exception{};
 struct ogl_invalid_operation                                   : virtual ogl_exception{};
 struct ogl_stack_overflow                                              : virtual ogl_exception{};
-struct ogl_stack_underflow                                             : virtual ogl_exception{};                      
+struct ogl_stack_underflow                                             : virtual ogl_exception{};
 struct ogl_out_of_memory                                               : virtual ogl_exception{};
 struct ogl_invalid_framebuffer_operation_ext   : virtual ogl_exception{};
 
-void SMFL_GLCheckError(const std::string& expr, const std::string& File, unsigned int Line);
+void SMFL_GLCheckError(const std::string& expr, const char* func, const char* file, unsigned int line);
 
 //#ifdef _DEBUG
-       
+
 #define CASPAR_GL_EXPR_STR(expr) #expr
 
 #define GL(expr) \
        if(false){}else \
        { \
                (expr);  \
-               caspar::gl::SMFL_GLCheckError(CASPAR_GL_EXPR_STR(expr), __FILE__, __LINE__);\
+               caspar::gl::SMFL_GLCheckError(CASPAR_GL_EXPR_STR(expr), __FUNCTION__, __FILE__, __LINE__);\
        }
 
 // TODO: decltype version does not play well with gcc
@@ -55,7 +55,7 @@ void SMFL_GLCheckError(const std::string& expr, const std::string& File, unsigne
        [&]()\
        {\
                auto ret = (expr);\
-               caspar::gl::SMFL_GLCheckError(CASPAR_GL_EXPR_STR(expr), __FILE__, __LINE__);\
+               caspar::gl::SMFL_GLCheckError(CASPAR_GL_EXPR_STR(expr), __FUNCTION__, __FILE__, __LINE__);\
                return ret;\
        }()
 /*#define GL2(expr) \