diff --git a/CMakeLists.txt b/CMakeLists.txt index d85f0996..745b5d11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,7 +167,6 @@ if (WIN32) set(GLFW3_INCLUDE_DIR ${GLFW3_INCLUDE_DIR} "${DEPS_DIR}/glfw/include/") set(PNG_PNG_INCLUDE_DIR ${PNG_PNG_INCLUDE_DIR} "${DEPS_DIR}/libpng/include/") set(ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIR} "${DEPS_DIR}/zlib/") - set(GLM_INCLUDE_DIR ${GLM_INCLUDE_DIR} "${DEPS_DIR}/glm/") set(OPENAL_INCLUDE_DIR ${OPENAL_INCLUDE_DIR} "${DEPS_DIR}/openal/include") set(LIBSNDFILE_INCLUDE_DIR ${LIBSNDFILE_INCLUDE_DIR} "${DEPS_DIR}/libsndfile/include") set(LUAJIT_INCLUDE_DIR ${LUAJIT_INCLUDE_DIR} "${DEPS_DIR}/luajit/include") @@ -191,6 +190,8 @@ if (WIN32) set(libserialport_LIBRARY ${LIBSERIALPORT_LIBRARY} "${DEPS_DIR}/libserialport/lib/${ARCH}/libserialport-0.lib") endif() +set(GLM_INCLUDE_DIR ${GLM_INCLUDE_DIR} "${DEPS_DIR}/glm/") + if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) set(SOURCES ${SOURCES} "eu07.rc") set(SOURCES ${SOURCES} "eu07.ico") @@ -199,10 +200,6 @@ endif() add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS}) -set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "stdafx.h") -set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) -cotire(${PROJECT_NAME}) - if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) # /wd4996: disable "deprecation" warnings # /wd4244: disable warnings for conversion with possible loss of data @@ -239,7 +236,7 @@ find_package(Threads REQUIRED) target_link_libraries(${PROJECT_NAME} Threads::Threads) find_package(GLM REQUIRED) -include_directories(${GLM_INCLUDE_DIRS}) +include_directories(${GLM_INCLUDE_DIR}) find_package(OpenAL REQUIRED) include_directories(${OPENAL_INCLUDE_DIR}) @@ -263,3 +260,7 @@ target_link_libraries(${PROJECT_NAME} ASIO::ASIO) if (WIN32) target_link_libraries(${PROJECT_NAME} ws2_32) endif() + +set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "stdafx.h") +set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) +cotire(${PROJECT_NAME}) diff --git a/application.cpp b/application.cpp index 79aa66ea..863ccedd 100644 --- a/application.cpp +++ b/application.cpp @@ -615,7 +615,9 @@ eu07_application::init_glfw() { } else { +#ifdef GLFW_CONTEXT_CREATION_API glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API); +#endif glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..c4c624ec --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,79 @@ +jobs: + - job: ubuntu1604 + pool: + vmImage: 'Ubuntu-16.04' + displayName: 'Ubuntu 16.04 x86-64' + steps: + - script: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt-get update -y + sudo apt-get install -y libglfw3-dev python2.7-dev libpng16-dev libopenal-dev libluajit-5.1-dev libserialport-dev libsndfile1-dev + sudo apt-get install -y gcc-8 g++-8 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 100 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100 + cd ref + git clone "https://github.com/chriskohlhoff/asio" --depth 1 --branch asio-1-12-2 -q + displayName: 'Install dependencies' + - script: | + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release + cmake --build . + displayName: 'Build' + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: 'build/bin' + artifactName: binaries + displayName: 'Publish binaries' + + - job: windows_x64 + pool: + vmImage: 'vs2017-win2016' + displayName: 'Windows VS2017 x86-64' + steps: + - script: | + cd ref + git clone "https://github.com/chriskohlhoff/asio" --depth 1 --branch asio-1-12-2 -q + displayName: 'Download extra dependencies' + - script: | + mkdir build + cd build + cmake .. -A x64 + cmake --build . --config RelWithDebInfo + displayName: 'Build' + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: 'build/bin' + artifactName: binaries + displayName: 'Publish binaries' + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: 'build/pdb' + artifactName: symbols + displayName: 'Publish symbols' + + - job: windows_x32 + pool: + vmImage: 'vs2017-win2016' + displayName: 'Windows VS2017 x86' + steps: + - script: | + cd ref + git clone "https://github.com/chriskohlhoff/asio" --depth 1 --branch asio-1-12-2 -q + displayName: 'Download extra dependencies' + - script: | + mkdir build + cd build + cmake .. -A Win32 -T v141_xp + cmake --build . --config RelWithDebInfo + displayName: 'Build' + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: 'build/bin' + artifactName: binaries + displayName: 'Publish binaries' + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: 'build/pdb' + artifactName: symbols + displayName: 'Publish symbols' diff --git a/gl/ubo.h b/gl/ubo.h index 781e57a3..eb3dd810 100644 --- a/gl/ubo.h +++ b/gl/ubo.h @@ -61,7 +61,7 @@ namespace gl void set_modelview(const glm::mat4 &mv) { modelview = mv; - modelviewnormal = glm::mat3(glm::transpose(glm::inverse(mv))); + modelviewnormal = glm::mat3x4(glm::mat3(glm::transpose(glm::inverse(mv)))); } }; diff --git a/ref/python/lib/x64/python27.lib b/ref/python/lib/x64/python27.lib index 5ac773c3..cd1a64c9 100644 Binary files a/ref/python/lib/x64/python27.lib and b/ref/python/lib/x64/python27.lib differ diff --git a/ref/python/lib/x86/python27.lib b/ref/python/lib/x86/python27.lib index 5ac773c3..94542ea1 100644 Binary files a/ref/python/lib/x86/python27.lib and b/ref/python/lib/x86/python27.lib differ diff --git a/stdafx.h b/stdafx.h index 3ea01281..98be54cd 100644 --- a/stdafx.h +++ b/stdafx.h @@ -85,6 +85,12 @@ //#define GLFW_INCLUDE_GLU #include +#ifndef GLFW_TRUE +#define GLFW_FALSE 0 +#define GLFW_TRUE 1 +#define glfwGetKeyName(a, b) ("") +#endif + #define GLM_ENABLE_EXPERIMENTAL #define GLM_FORCE_CTOR_INIT #include diff --git a/texturewindow.cpp b/texturewindow.cpp index c32c2953..d52df1da 100644 --- a/texturewindow.cpp +++ b/texturewindow.cpp @@ -51,8 +51,6 @@ texture_window::texture_window(texture_handle src, std::string surfacename) glfwSetWindowUserPointer(m_window, this); glfwSetFramebufferSizeCallback(m_window, texture_window_fb_resize); - glfwFocusWindow(root); - m_renderthread = std::make_unique(&texture_window::threadfunc, this); } diff --git a/uart.cpp b/uart.cpp index 5080964a..a654cb61 100644 --- a/uart.cpp +++ b/uart.cpp @@ -14,7 +14,7 @@ uart_input::uart_input() if (sp_get_port_by_name(conf.port.c_str(), &port) != SP_OK) throw std::runtime_error("uart: cannot find specified port"); - if (sp_open(port, SP_MODE_READ_WRITE) != SP_OK) + if (sp_open(port, (sp_mode)(SP_MODE_READ | SP_MODE_WRITE)) != SP_OK) throw std::runtime_error("uart: cannot open port"); sp_port_config *config; diff --git a/widgets/map_objects.h b/widgets/map_objects.h index 15640992..a5b70d84 100644 --- a/widgets/map_objects.h +++ b/widgets/map_objects.h @@ -1,7 +1,7 @@ #pragma once #include "simulation.h" -#include "event.h" +#include "Event.h" #include "scene.h" namespace map {