Merge branch 'milek-dev' into gfx-work

This commit is contained in:
milek7
2019-02-25 23:11:12 +01:00
10 changed files with 97 additions and 11 deletions

View File

@@ -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})

View File

@@ -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);

79
azure-pipelines.yml Normal file
View File

@@ -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'

View File

@@ -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))));
}
};

Binary file not shown.

Binary file not shown.

View File

@@ -85,6 +85,12 @@
//#define GLFW_INCLUDE_GLU
#include <GLFW/glfw3.h>
#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 <glm/glm.hpp>

View File

@@ -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<std::thread>(&texture_window::threadfunc, this);
}

View File

@@ -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;

View File

@@ -1,7 +1,7 @@
#pragma once
#include "simulation.h"
#include "event.h"
#include "Event.h"
#include "scene.h"
namespace map {