fixed error messages showing in release mode
This commit is contained in:
parent
837fe1cd39
commit
57c6d122a8
@ -38,8 +38,12 @@ set(LIB_ROOT ${DEPENDENCIES_ROOT}/lib/${SYSTEM_LIB_PATH})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIB_ROOT}) #for SHARED
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIB_ROOT}) #for STATIC
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
set(CPP_DEFINES -DRENDER_DEBUG)
|
||||
endif()
|
||||
|
||||
add_library(${LIBRARY_NAME} STATIC ${LIB_SRC_LIST})
|
||||
add_definitions(-std=c++11)
|
||||
add_definitions(-std=c++11 ${CPP_DEFINES})
|
||||
|
||||
include_directories(
|
||||
${INCLUDE_ROOT}
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
||||
#ifdef RENDER_DEBUG
|
||||
#define STR(x) #x
|
||||
#define glAssert(code) \
|
||||
code; \
|
||||
@ -19,6 +20,9 @@
|
||||
std::cerr<<"Erreur OpenGL ("<<__FILE__<<":"<<__LINE__<<", "<<STR(code)<<") : "<<(const char*)gluErrorString (err)<<"("<<err<<")"<<std::endl; \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define glAssert(code) code;
|
||||
#endif
|
||||
|
||||
#endif // GLASSERT
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user