Added missing display callback

Added compiler warnings for MSVC and GNU GCC
This commit is contained in:
Teo-CD 2019-10-12 15:01:38 +02:00
parent 90f294e0cc
commit 38cc784ec8
2 changed files with 8 additions and 1 deletions

View file

@ -34,4 +34,10 @@ target_link_libraries(tests_opengl
target_include_directories(tests_opengl PRIVATE target_include_directories(tests_opengl PRIVATE
${OPENGL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}
${GLUT_INCLUDE_DIR}) ${GLUT_INCLUDE_DIR})
if (CMAKE_COMPILER_IS_GNUCXX)
target_compile_options(tests_opengl PRIVATE -Wall -Wpedantic -Wextra)
elseif(MSVC)
target_compile_options(tests_opengl PRIVATE /W4)
endif()

View file

@ -118,6 +118,7 @@ int main(int argc, char** argv)
glViewport(0,0,glutGet(GLUT_WINDOW_WIDTH),glutGet(GLUT_WINDOW_HEIGHT)); glViewport(0,0,glutGet(GLUT_WINDOW_WIDTH),glutGet(GLUT_WINDOW_HEIGHT));
glutDisplayFunc(display);
glutIdleFunc(display); glutIdleFunc(display);
glutTimerFunc(50,update_angle,0); glutTimerFunc(50,update_angle,0);
KeyStateManager::register_glut_callbacks(); KeyStateManager::register_glut_callbacks();