# HG changeset patch # User Teemu Piippo # Date 1598298661 -10800 # Node ID e234edb5e613c67675bf7d775de0cf1ea4f281bf # Parent 028798a7259128a8325162ff59da47f7a312fcf6 remove dependency on glut, fixes diff -r 028798a72591 -r e234edb5e613 CMakeLists.txt --- a/CMakeLists.txt Mon Mar 09 23:42:26 2020 +0200 +++ b/CMakeLists.txt Mon Aug 24 22:51:01 2020 +0300 @@ -11,15 +11,20 @@ find_package(Qt5OpenGL REQUIRED) find_package(Qt5Network REQUIRED) find_package(Qt5LinguistTools REQUIRED) -find_package(GLUT REQUIRED) find_package(GLM REQUIRED) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) find_package(OpenGL REQUIRED) include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) -include_directories(${GLUT_INCLUDE_DIR}) include_directories(${GLM_INCLUDE_DIR}) +source_group("1 Foundation code" REGULAR_EXPRESSION "src/.+\\.(cpp|h)") +source_group("4 OpenGL renderer" REGULAR_EXPRESSION "src/gl/.+\\.(cpp|h)") +source_group("5 LDraw line types" REGULAR_EXPRESSION "src/linetypes/.+\\.(cpp|h)") +source_group("3 UI and widgets" REGULAR_EXPRESSION "src/(ui|widgets)/.+\\.(cpp|h)") +source_group("3.1 Settings editor" REGULAR_EXPRESSION "src/settingseditor/.+\\.(cpp|h)") +source_group("3.2 Main UI" REGULAR_EXPRESSION "src/(mainwindow|document|documentmanager|uiutilities)\\.(cpp|h)") +source_group("2 Model handling" REGULAR_EXPRESSION "src/(model|modeleditcontext|libraries|colors|parser)\\.(cpp|h)") set (LDFORGE_SOURCES src/colors.cpp @@ -164,7 +169,6 @@ set_source_files_properties(${LDFORGE_OTHER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) set_target_properties(ldforge PROPERTIES AUTOMOC 1) target_link_libraries(ldforge Qt5::Widgets Qt5::Network Qt5::OpenGL ${OPENGL_LIBRARIES}) -target_link_libraries(ldforge ${GLUT_LIBRARIES}) add_dependencies(ldforge resources) cotire(ldforge) diff -r 028798a72591 -r e234edb5e613 src/basics.h --- a/src/basics.h Mon Mar 09 23:42:26 2020 +0200 +++ b/src/basics.h Mon Aug 24 22:51:01 2020 +0300 @@ -81,7 +81,7 @@ } template -constexpr int countof(T(&)[N]) +constexpr int countof(T const (&)[N]) { return N; } diff -r 028798a72591 -r e234edb5e613 src/gl/gridprogram.cpp --- a/src/gl/gridprogram.cpp Mon Mar 09 23:42:26 2020 +0200 +++ b/src/gl/gridprogram.cpp Mon Aug 24 22:51:01 2020 +0300 @@ -107,7 +107,7 @@ int GridProgram::vertexCount() const { - return countof(data); + return glm::countof(data); } void GridProgram::setupVertexArrays() diff -r 028798a72591 -r e234edb5e613 src/gl/partrenderer.cpp --- a/src/gl/partrenderer.cpp Mon Mar 09 23:42:26 2020 +0200 +++ b/src/gl/partrenderer.cpp Mon Aug 24 22:51:01 2020 +0300 @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -#include #include #include #include diff -r 028798a72591 -r e234edb5e613 src/main.cpp --- a/src/main.cpp Mon Mar 09 23:42:26 2020 +0200 +++ b/src/main.cpp Mon Aug 24 22:51:01 2020 +0300 @@ -17,13 +17,11 @@ */ #include -#include #include "mainwindow.h" #include "version.h" int main(int argc, char *argv[]) { - ::glutInit(&argc, argv); QCoreApplication::setApplicationName(::appName); QCoreApplication::setOrganizationName("hecknology.net"); QCoreApplication::setOrganizationDomain("hecknology.net");