Mon, 24 Aug 2020 22:51:01 +0300
remove dependency on glut, fixes
CMakeLists.txt | file | annotate | diff | comparison | revisions | |
src/basics.h | file | annotate | diff | comparison | revisions | |
src/gl/gridprogram.cpp | file | annotate | diff | comparison | revisions | |
src/gl/partrenderer.cpp | file | annotate | diff | comparison | revisions | |
src/main.cpp | file | annotate | diff | comparison | revisions |
--- 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)
--- 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<typename T, int N> -constexpr int countof(T(&)[N]) +constexpr int countof(T const (&)[N]) { return N; }
--- 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()
--- 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 <http://www.gnu.org/licenses/>. */ -#include <GL/glut.h> #include <glm/ext/matrix_transform.hpp> #include <glm/ext/matrix_clip_space.hpp> #include <QMouseEvent>
--- 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 <QApplication> -#include <GL/glut.h> #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");