From 38507210fff8f46ae7105172748820355434c660 Mon Sep 17 00:00:00 2001 From: Anne Marije v/d Meer Date: Mon, 12 Nov 2018 17:10:11 +0100 Subject: [PATCH] remove surplus cmake file and fix sdl problem --- CMakeLists.txt | 2 +- src/Main.cpp | 12 ++----- src/cmake/Modules/FindGLM.cmake | 64 --------------------------------- src/graphics/imPipeline.h | 1 - 4 files changed, 3 insertions(+), 76 deletions(-) delete mode 100644 src/cmake/Modules/FindGLM.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 830bd21..9cfc49b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required(VERSION 3.0) project(imaginaryMyst LANGUAGES CXX) -list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/src/cmake/Modules) +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) include(FeatureSummary) message(${CMAKE_MODULE_PATH}) diff --git a/src/Main.cpp b/src/Main.cpp index d277130..b1c546f 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -122,7 +122,7 @@ ST::string s_rootPath; imVfs s_vfs; SDL_Window *s_display; -SDL_GLContext s_glContext +SDL_GLContext s_glContext; FILE *s_logFile = stderr; PFNGLCOMPRESSEDTEXIMAGE2DARBPROC GLX_CompressedTexImage2D = 0; @@ -249,21 +249,13 @@ int main(int argc, char *argv[]) // Create a window for the game -<<<<<<< HEAD - s_display = SDL_CreateWindow("imaginaryMyst Alpha", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, winWidth, - winHeight, SDL_WINDOW_OPENGL); - - SDL_GLContext glContext = SDL_GL_CreateContext(s_display); -======= s_display = SDL_CreateWindow("imaginaryMyst Alpha", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, winWidth, winHeight, SDL_WINDOW_OPENGL); s_glContext = SDL_GL_CreateContext(s_display); - ->>>>>>> CHeck for opengl version, minimum require 3, and only enable debugging when supported glewExperimental = true; if (glewInit() != GLEW_OK) { fprintf(stderr, "Failed to initialize GLEW\n"); @@ -336,6 +328,6 @@ int main(int argc, char *argv[]) SDL_GL_SwapWindow(s_display); SDL_Delay(3000); -cleanup(); + cleanup(); return 0; } diff --git a/src/cmake/Modules/FindGLM.cmake b/src/cmake/Modules/FindGLM.cmake deleted file mode 100644 index 9828c48..0000000 --- a/src/cmake/Modules/FindGLM.cmake +++ /dev/null @@ -1,64 +0,0 @@ -# FindGLM - attempts to locate the glm matrix/vector library. -# -# This module defines the following variables (on success): -# GLM_INCLUDE_DIRS - where to find glm/glm.hpp -# GLM_FOUND - if the library was successfully located -# -# It is trying a few standard installation locations, but can be customized -# with the following variables: -# GLM_ROOT_DIR - root directory of a glm installation -# Headers are expected to be found in either: -# /glm/glm.hpp OR -# /include/glm/glm.hpp -# This variable can either be a cmake or environment -# variable. Note however that changing the value -# of the environment varible will NOT result in -# re-running the header search and therefore NOT -# adjust the variables set by this module. - -#============================================================================= -# Copyright 2012 Carsten Neumann -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# default search dirs -SET(_glm_HEADER_SEARCH_DIRS - "/usr/include" - "/usr/local/include") - -# check environment variable -SET(_glm_ENV_ROOT_DIR "$ENV{GLM_ROOT_DIR}") - -IF(NOT GLM_ROOT_DIR AND _glm_ENV_ROOT_DIR) - SET(GLM_ROOT_DIR "${_glm_ENV_ROOT_DIR}") -ENDIF(NOT GLM_ROOT_DIR AND _glm_ENV_ROOT_DIR) - -# put user specified location at beginning of search -IF(GLM_ROOT_DIR) - SET(_glm_HEADER_SEARCH_DIRS "${GLM_ROOT_DIR}" - "${GLM_ROOT_DIR}/include" - ${_glm_HEADER_SEARCH_DIRS}) -ENDIF(GLM_ROOT_DIR) - -# locate header -FIND_PATH(GLM_INCLUDE_DIR "glm/glm.hpp" - PATHS ${_glm_HEADER_SEARCH_DIRS}) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLM DEFAULT_MSG - GLM_INCLUDE_DIR) - -IF(GLM_FOUND) - SET(GLM_INCLUDE_DIRS "${GLM_INCLUDE_DIR}") - - MESSAGE(STATUS "GLM_INCLUDE_DIR = ${GLM_INCLUDE_DIR}") -ENDIF(GLM_FOUND) - diff --git a/src/graphics/imPipeline.h b/src/graphics/imPipeline.h index 764fe57..68eb4ef 100644 --- a/src/graphics/imPipeline.h +++ b/src/graphics/imPipeline.h @@ -2,7 +2,6 @@ #define IMAGINARYMYST_IMPIPELINE_H -#include #include #include #include