Fix issue when building the testbed application on MacOS X
This commit is contained in:
parent
18924135e0
commit
264705056e
|
@ -8,6 +8,7 @@ project(Testbed)
|
||||||
set(NANOGUI_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE)
|
set(NANOGUI_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE)
|
||||||
set(NANOGUI_BUILD_PYTHON OFF CACHE BOOL " " FORCE)
|
set(NANOGUI_BUILD_PYTHON OFF CACHE BOOL " " FORCE)
|
||||||
set(NANOGUI_INSTALL OFF CACHE BOOL " " FORCE)
|
set(NANOGUI_INSTALL OFF CACHE BOOL " " FORCE)
|
||||||
|
set(NANOGUI_BACKEND OpenGL CACHE BOOL " " FORCE)
|
||||||
|
|
||||||
# ---- Make sure to recursively clone all the git submodules for external libraries (nanogui) --- #
|
# ---- Make sure to recursively clone all the git submodules for external libraries (nanogui) --- #
|
||||||
find_package(Git QUIET)
|
find_package(Git QUIET)
|
||||||
|
|
|
@ -95,12 +95,15 @@ void TestbedApplication::init() {
|
||||||
glGetIntegerv(GL_MAJOR_VERSION, &glMajorVersion);
|
glGetIntegerv(GL_MAJOR_VERSION, &glMajorVersion);
|
||||||
glGetIntegerv(GL_MINOR_VERSION, &glMinorVersion);
|
glGetIntegerv(GL_MINOR_VERSION, &glMinorVersion);
|
||||||
|
|
||||||
|
#ifdef GL_DEBUG_OUTPUT
|
||||||
|
|
||||||
if (glMajorVersion > 4 || (glMajorVersion == 4 && glMinorVersion >= 3)) {
|
if (glMajorVersion > 4 || (glMajorVersion == 4 && glMinorVersion >= 3)) {
|
||||||
|
|
||||||
// Enable OpenGL error reporting
|
// Enable OpenGL error reporting
|
||||||
glEnable(GL_DEBUG_OUTPUT);
|
glEnable(GL_DEBUG_OUTPUT);
|
||||||
glDebugMessageCallback(onOpenGLError, 0);
|
glDebugMessageCallback(onOpenGLError, 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
mIsInitialized = true;
|
mIsInitialized = true;
|
||||||
}
|
}
|
||||||
|
@ -307,6 +310,7 @@ void TestbedApplication::notifyEngineSetttingsChanged() {
|
||||||
void GLAPIENTRY TestbedApplication::onOpenGLError(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length,
|
void GLAPIENTRY TestbedApplication::onOpenGLError(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length,
|
||||||
const GLchar* message, const void* userParam ) {
|
const GLchar* message, const void* userParam ) {
|
||||||
|
|
||||||
|
#ifdef GL_DEBUG_OUTPUT
|
||||||
if (type == GL_DEBUG_TYPE_ERROR) {
|
if (type == GL_DEBUG_TYPE_ERROR) {
|
||||||
/*
|
/*
|
||||||
fprintf( stderr, "GL CALLBACK: %s type = 0x%x, severity = 0x%x, message = %s\n",
|
fprintf( stderr, "GL CALLBACK: %s type = 0x%x, severity = 0x%x, message = %s\n",
|
||||||
|
@ -314,6 +318,8 @@ void GLAPIENTRY TestbedApplication::onOpenGLError(GLenum source, GLenum type, GL
|
||||||
type, severity, message );
|
type, severity, message );
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute the FPS
|
// Compute the FPS
|
||||||
|
|
Loading…
Reference in New Issue
Block a user