Reenabling debug features for debug builds.
This commit is contained in:
parent
5d52c9cdaf
commit
33e7baed94
@ -53,6 +53,9 @@ ADD_DEFINITIONS(-DNO_SPACE_NAVIGATOR_SUPPORT)
|
|||||||
#
|
#
|
||||||
# Lets the binary get written to a shared folder (which can be ignored by git).
|
# Lets the binary get written to a shared folder (which can be ignored by git).
|
||||||
# Will also set the run directory for QTCreator:
|
# Will also set the run directory for QTCreator:
|
||||||
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -DSAXUM_DEBUG")
|
||||||
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -DSAXUM_DEBUG")
|
||||||
|
|
||||||
set(dir ${CMAKE_CURRENT_SOURCE_DIR}/binaries)
|
set(dir ${CMAKE_CURRENT_SOURCE_DIR}/binaries)
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
|
set(EXECUTABLE_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ static void keyCallback(GLFWwindow* _window, int _key, int, int _action, int)
|
|||||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
||||||
app.setCameraLock(false);
|
app.setCameraLock(false);
|
||||||
}
|
}
|
||||||
#ifdef CMAKE_CXX_FLAGS_DEBUG
|
#ifdef SAXUM_DEBUG
|
||||||
if (_key == GLFW_KEY_F5 && _action == GLFW_PRESS) {
|
if (_key == GLFW_KEY_F5 && _action == GLFW_PRESS) {
|
||||||
app.getGraphics()->setRenderShadows(!app.getGraphics()->getRenderShadows());
|
app.getGraphics()->setRenderShadows(!app.getGraphics()->getRenderShadows());
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ bool createWindow()
|
|||||||
// activate multisampling (second parameter is the number of samples):
|
// activate multisampling (second parameter is the number of samples):
|
||||||
glfwWindowHint( GLFW_SAMPLES, 4);
|
glfwWindowHint( GLFW_SAMPLES, 4);
|
||||||
|
|
||||||
#ifdef CMAKE_CXX_FLAGS_DEBUG
|
#ifdef SAXUM_DEBUG
|
||||||
// request an OpenGL debug context:
|
// request an OpenGL debug context:
|
||||||
glfwWindowHint( GLFW_OPENGL_DEBUG_CONTEXT, true );
|
glfwWindowHint( GLFW_OPENGL_DEBUG_CONTEXT, true );
|
||||||
#endif
|
#endif
|
||||||
@ -120,7 +120,7 @@ bool createWindow()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
#ifdef CMAKE_CXX_FLAGS_DEBUG
|
#ifdef SAXUM_DEBUG
|
||||||
ACGL::init(true);
|
ACGL::init(true);
|
||||||
#else
|
#else
|
||||||
ACGL::init(false); // do not request debug context
|
ACGL::init(false); // do not request debug context
|
||||||
@ -188,7 +188,7 @@ int main( int argc, char *argv[] )
|
|||||||
keyboardState.aPressed = glfwGetKey(window, GLFW_KEY_A) == GLFW_PRESS;
|
keyboardState.aPressed = glfwGetKey(window, GLFW_KEY_A) == GLFW_PRESS;
|
||||||
keyboardState.sPressed = glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS;
|
keyboardState.sPressed = glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS;
|
||||||
keyboardState.dPressed = glfwGetKey(window, GLFW_KEY_D) == GLFW_PRESS;
|
keyboardState.dPressed = glfwGetKey(window, GLFW_KEY_D) == GLFW_PRESS;
|
||||||
#ifdef CMAKE_CXX_FLAGS_DEBUG
|
#ifdef SAXUM_DEBUG
|
||||||
keyboardState.lPressed = glfwGetKey(window, GLFW_KEY_L) == GLFW_PRESS;
|
keyboardState.lPressed = glfwGetKey(window, GLFW_KEY_L) == GLFW_PRESS;
|
||||||
keyboardState.kPressed = glfwGetKey(window, GLFW_KEY_K) == GLFW_PRESS;
|
keyboardState.kPressed = glfwGetKey(window, GLFW_KEY_K) == GLFW_PRESS;
|
||||||
keyboardState.f1Pressed = glfwGetKey(window, GLFW_KEY_F1) == GLFW_PRESS;
|
keyboardState.f1Pressed = glfwGetKey(window, GLFW_KEY_F1) == GLFW_PRESS;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "model.hh"
|
#include "model.hh"
|
||||||
|
|
||||||
Model::Model(std::string filePath, float scale) {
|
Model::Model(std::string filePath, float scale) {
|
||||||
#ifdef CMAKE_CXX_FLAGS_DEBUG
|
#ifdef SAXUM_DEBUG
|
||||||
printf("Loading %s\n", filePath.c_str());
|
printf("Loading %s\n", filePath.c_str());
|
||||||
#endif
|
#endif
|
||||||
reference = ACGL::OpenGL::VertexArrayObjectCreator(filePath).create();
|
reference = ACGL::OpenGL::VertexArrayObjectCreator(filePath).create();
|
||||||
|
Loading…
Reference in New Issue
Block a user