aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-12-22 22:37:58 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-12-22 22:37:58 +0000
commit137994df5ca3aa3fba97c0e1718ec45af309bebe (patch)
tree450d879b5b30c0571ce7ed1928d337ce7146ab25
parent224e252ca23d5dcaef2f6236a497e6f42cf49016 (diff)
parent0f9d8a7f951a58252175c0b3280f24ef6529150f (diff)
downloadYAGE-137994df5ca3aa3fba97c0e1718ec45af309bebe.tar.gz
YAGE-137994df5ca3aa3fba97c0e1718ec45af309bebe.zip
Merge branch 'develop'
-rw-r--r--.clang-format1
-rw-r--r--.dir-locals.el6
-rw-r--r--.gitignore1
-rw-r--r--.gitmodules28
-rw-r--r--.travis.yml20
-rw-r--r--CMakeLists.txt124
-rw-r--r--README.md6
-rw-r--r--docs/Doxyfile.in (renamed from docs/Doxyfile)10
-rw-r--r--editor/editor.pro34
-rw-r--r--editor/editor.pro.user336
-rw-r--r--editor/editorwindow.cpp26
-rw-r--r--editor/editorwindow.h25
-rw-r--r--editor/editorwindow.ui69
-rw-r--r--editor/main.cpp19
-rw-r--r--examples/CMakeLists.txt2
-rw-r--r--examples/simplegame/dngn_blood_fountain.png (renamed from tests/resources/dngn_blood_fountain.png)bin955 -> 955 bytes
-rw-r--r--examples/simplegame/main.cpp (renamed from tests/simplegame.cpp)16
-rw-r--r--examples/simplegame/textureshader.frag16
-rw-r--r--examples/simplegame/textureshader.vert (renamed from resources/defaultshader.vert)14
m---------external/glad (renamed from lib/glad)0
m---------external/glfw0
m---------external/glm0
m---------external/rapidjson0
-rw-r--r--lib/CMakeLists.txt37
m---------lib/glfw0
m---------lib/googletest0
m---------lib/rapidjson0
-rw-r--r--resources/defaultshader.frag16
-rw-r--r--resources/textureshader.frag16
-rw-r--r--resources/textureshader.vert23
-rwxr-xr-xscripts/travis_build33
-rwxr-xr-xscripts/update_docs17
-rwxr-xr-xscripts/update_version38
-rw-r--r--tests/CMakeLists.txt34
-rw-r--r--tests/active/test.cpp (renamed from tests/activetest.cpp)0
m---------tests/external/googletest0
-rw-r--r--tests/log/test.cpp (renamed from tests/logtest.cpp)0
-rw-r--r--tests/matrix/test.cpp (renamed from tests/matrixtest.cpp)0
-rw-r--r--tests/particlebody/test.cpp (renamed from tests/particlebodytest.cpp)0
-rw-r--r--tests/rendertest.cpp13
-rw-r--r--tests/rendertest.h19
-rw-r--r--tests/resources/simplegame.frag0
-rw-r--r--tests/resources/simplegame.vert0
-rw-r--r--tests/spritesheet/floor_atlas.json (renamed from tests/resources/floor_atlas.json)0
-rw-r--r--tests/spritesheet/floor_atlas.png (renamed from tests/resources/floor_atlas.png)bin234876 -> 234876 bytes
-rw-r--r--tests/spritesheet/test.cpp (renamed from tests/spritesheettest.cpp)0
-rw-r--r--tests/struct/test.cpp (renamed from tests/structtest.cpp)0
-rw-r--r--tests/syncqueue/test.cpp (renamed from tests/syncqueuetest.cpp)0
-rw-r--r--tests/thread/test.cpp (renamed from tests/threadtest.cpp)0
-rw-r--r--tests/vector3/test.cpp (renamed from tests/vector3test.cpp)0
-rw-r--r--tests/vector4/test.cpp (renamed from tests/vector4test.cpp)0
-rw-r--r--tests/window/test.cpp (renamed from tests/windowtest.cpp)0
-rw-r--r--tests/yage/test.cpp (renamed from tests/yagetest.cpp)0
-rw-r--r--yage/CMakeLists.txt29
-rw-r--r--yage/core/camera2d.cpp6
-rw-r--r--yage/core/camera2d.h4
-rw-r--r--yage/core/input.h142
-rw-r--r--yage/core/resourcemanager.cpp1
-rw-r--r--yage/core/resourcemanager.h3
-rw-r--r--yage/core/sprite.h3
-rw-r--r--yage/core/texturecache.cpp5
-rw-r--r--yage/core/window.cpp16
-rw-r--r--yage/physics/particlebody.h1
-rw-r--r--yage/yage.h5
64 files changed, 415 insertions, 799 deletions
diff --git a/.clang-format b/.clang-format
index a4489c53..6ba7c5be 100644
--- a/.clang-format
+++ b/.clang-format
@@ -4,6 +4,7 @@ IndentWidth: 4
---
Language: Cpp
AccessModifierOffset: -4
+AlignConsecutiveAssignments: true
AlignTrailingComments: true
AllowShortFunctionsOnASingleLine: Inline
AlwaysBreakTemplateDeclarations: true
diff --git a/.dir-locals.el b/.dir-locals.el
index db723df8..53a0bded 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,3 +1,3 @@
-((nil . ((projectile-project-compilation-cmd . "mkdir -p build && cd build && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DUNIT_TESTS=ON .. && make -j9")
- (projectile-project-test-cmd . "cd build && ctest")
- (projectile-project-run-cmd . "./bin/simplegame"))))
+((nil . ((projectile-project-compilation-cmd . "mkdir -p build && cd build && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DYAGE_BUILD_TESTS=ON .. && make -j9")
+ (projectile-project-test-cmd . "cd build/tests && ctest")
+ (projectile-project-run-cmd . "./build/bin/simplegame"))))
diff --git a/.gitignore b/.gitignore
index 991dcdfa..02a05faf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ Testing
# specific directory to ignore
/html
+/docs/Doxyfile
# extensions to ignore
*.o
diff --git a/.gitmodules b/.gitmodules
index e9c4fb4f..1cac6ea5 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,16 +1,20 @@
-[submodule "lib/googletest"]
- path = lib/googletest
- url = https://github.com/google/googletest
+[submodule "external/glm"]
+ path = external/glm
+ url = https://github.com/g-truc/glm.git
branch = master
-[submodule "lib/rapidjson"]
- path = lib/rapidjson
- url = https://github.com/miloyip/rapidjson
+[submodule "external/glad"]
+ path = external/glad
+ url = https://github.com/ymherklotz/glad.git
branch = master
-[submodule "lib/glfw"]
- path = lib/glfw
+[submodule "external/glfw"]
+ path = external/glfw
url = https://github.com/glfw/glfw.git
- branch = latest
-[submodule "lib/glad"]
- path = lib/glad
- url = https://github.com/ymherklotz/glad.git
+ branch = master
+[submodule "external/rapidjson"]
+ path = external/rapidjson
+ url = https://github.com/Tencent/rapidjson.git
+ branch = master
+[submodule "tests/external/googletest"]
+ path = tests/external/googletest
+ url = https://github.com/google/googletest.git
branch = master
diff --git a/.travis.yml b/.travis.yml
index 7a43043e..0cc4da23 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,7 +21,6 @@ matrix:
- g++-5
- libegl1-mesa-dev
- libgles2-mesa-dev
- - libglm-dev
- xorg-dev
- libglu1-mesa-dev
- doxygen
@@ -38,7 +37,6 @@ matrix:
- g++-6
- libegl1-mesa-dev
- libgles2-mesa-dev
- - libglm-dev
- xorg-dev
- libglu1-mesa-dev
- doxygen
@@ -55,7 +53,6 @@ matrix:
- g++-7
- libegl1-mesa-dev
- libgles2-mesa-dev
- - libglm-dev
- xorg-dev
- libglu1-mesa-dev
- doxygen
@@ -63,7 +60,7 @@ matrix:
- ubuntu-toolchain-r-test
compiler: g++-7
env:
- - "MATRIX_EVAL=\"CC=gcc-7 && CXX=g++-7\""
+ - "MATRIX_EVAL=\"CC=gcc-7 && CXX=g++-7 && BUILD_DOCS=1\""
os: linux
-
addons:
@@ -73,7 +70,6 @@ matrix:
- clang-4.0
- libegl1-mesa-dev
- libgles2-mesa-dev
- - libglm-dev
- xorg-dev
- libglu1-mesa-dev
- doxygen
@@ -92,7 +88,6 @@ matrix:
- clang-5.0
- libegl1-mesa-dev
- libgles2-mesa-dev
- - libglm-dev
- xorg-dev
- libglu1-mesa-dev
- doxygen
@@ -106,13 +101,6 @@ matrix:
notifications:
email: false
script:
- - "$CC --version"
- - "$CXX --version"
- - "cd $TRAVIS_BUILD_DIR"
- - "mkdir -p build"
- - "cd build"
- - "cmake -DUNIT_TESTS=ON .."
- - "make -j9"
- - ctest
- - "cd .. && ./scripts/update_docs"
-
+ - "./scripts/travis_build"
+
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ea75fa1..f2ec7120 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,54 +5,84 @@ project(yage
VERSION 0.1.3.0
LANGUAGES CXX)
-if(NOT DEFINED UNIT_TESTS)
- set(UNIT_TESTS 0)
-endif()
+option(YAGE_BUILD_TESTS "Build tests and ctest testing suite" ON)
+option(YAGE_BUILD_DOCS "Build documentation using Doxygen" ON)
# set standard
set(CMAKE_CXX_STANDARD 14)
-# set the test sources
-set(YAGE_TEST_DIR ${PROJECT_SOURCE_DIR}/tests)
-
-# set binary directory
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
-# find libraries
-find_package(OpenGL REQUIRED)
-
-# include subdirectories
-include(${CMAKE_CURRENT_SOURCE_DIR}/lib/CMakeLists.txt)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/yage)
-
-if(UNIT_TESTS)
- add_executable(simplegame tests/simplegame.cpp)
- target_link_libraries(simplegame yage)
-
- # enable tests
- enable_testing()
- set(SIMULATION_RUNS 1000)
-
- function(make_test test_name cycles)
- add_executable(${test_name} ${YAGE_TEST_DIR}/${test_name}.cpp)
- target_link_libraries(${test_name}
- gtest_main
- yage)
- add_test(NAME ${test_name} COMMAND ${test_name} --gtest_repeat=${cycles} --gtest_break_on_failure)
- endfunction(make_test)
-
- make_test(yagetest 1)
- make_test(matrixtest ${SIMULATION_RUNS})
- make_test(particlebodytest 100)
- make_test(windowtest ${SIMULATION_RUNS})
- make_test(spritesheettest ${SIMULATION_RUNS})
- make_test(vector3test ${SIMULATION_RUNS})
- make_test(vector4test ${SIMULATION_RUNS})
- make_test(logtest 1)
- make_test(threadtest 1)
- make_test(syncqueuetest 1)
- make_test(activetest 1)
- make_test(structtest ${SIMULATION_RUNS})
-endif()
+# find other libraries from source
+set(EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external)
+
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/")
+
+# GLFW3
+set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
+set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
+set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
+add_subdirectory(${EXTERNAL_DIR}/glfw)
+
+# glad
+add_subdirectory(${EXTERNAL_DIR}/glad)
+
+# yage
+file(GLOB YAGE_CORE_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} yage/core/*.cpp)
+file(GLOB YAGE_MATH_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} yage/math/*.cpp)
+file(GLOB YAGE_PHYSICS_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} yage/physics/*.cpp)
+file(GLOB YAGE_UTIL_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} yage/util/*.cpp)
+file(GLOB YAGE_CURRENT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} yage/*.cpp)
+
+set(YAGE_SOURCES
+ ${YAGE_CORE_SOURCES}
+ ${YAGE_PHYSICS_SOURCES}
+ ${YAGE_MATH_SOURCES}
+ ${YAGE_UTIL_SOURCES}
+ ${YAGE_CURRENT_SOURCES})
+
+add_library(yage
+ ${YAGE_SOURCES})
+
+target_include_directories(yage
+ PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/yage
+ ${EXTERNAL_DIR}/glm
+ ${EXTERNAL_DIR}/rapidjson/include)
+
+target_link_libraries(yage
+ glfw
+ ${GLFW_LIBRARIES}
+ glad)
+
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/examples)
+
+if(${YAGE_BUILD_TESTS})
+
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tests)
+
+endif(${YAGE_BUILD_TESTS})
+
+if(${YAGE_BUILD_DOCS})
+
+ find_package(Doxygen)
+
+ if(DOXYGEN_FOUND)
+
+ set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in)
+ set(DOXYGEN_OUT ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile)
+
+ configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
+ message("-- Configured Doxygen files")
+
+ add_custom_target(doc_doxygen ALL
+ COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} >/dev/null
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMENT "Generating API documentation with Doxygen")
+
+ else(DOXYGEN_FOUND)
+
+ message("Doxygen needs to be installed to generate the documentation.")
+
+ endif(DOXYGEN_FOUND)
+
+endif(${YAGE_BUILD_DOCS})
+
diff --git a/README.md b/README.md
index 882f37dd..8498be38 100644
--- a/README.md
+++ b/README.md
@@ -36,13 +36,13 @@ For example, one can use the following commands
``` shell
mkdir -p build
cd build
-cmake -DENABLE_TESTING=1 ..
+cmake ..
```
-You can then run google test on YAGE.
+The test suite can then be run using
``` shell
-ctest
+cd build/tests && ctest
```
License
diff --git a/docs/Doxyfile b/docs/Doxyfile.in
index 10422fba..ebb324e2 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile.in
@@ -38,7 +38,7 @@ PROJECT_NAME = "YAGE"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = v0.1.3
+PROJECT_NUMBER = v@yage_VERSION@
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY =
+OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/doc_doxygen/
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = docs \
- yage \
- README.md
+INPUT = @CMAKE_CURRENT_SOURCE_DIR@/docs \
+ @CMAKE_CURRENT_SOURCE_DIR@/yage \
+ @CMAKE_CURRENT_SOURCE_DIR@/README.md
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
diff --git a/editor/editor.pro b/editor/editor.pro
deleted file mode 100644
index 1cec2824..00000000
--- a/editor/editor.pro
+++ /dev/null
@@ -1,34 +0,0 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2017-09-10T12:11:18
-#
-#-------------------------------------------------
-
-QT += core gui
-
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
-
-TARGET = editor
-TEMPLATE = app
-
-# The following define makes your compiler emit warnings if you use
-# any feature of Qt which as been marked as deprecated (the exact warnings
-# depend on your compiler). Please consult the documentation of the
-# deprecated API in order to know how to port your code away from it.
-DEFINES += QT_DEPRECATED_WARNINGS
-
-# You can also make your code fail to compile if you use deprecated APIs.
-# In order to do so, uncomment the following line.
-# You can also select to disable deprecated APIs only up to a certain version of Qt.
-#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-
-
-SOURCES += \
- main.cpp \
- editorwindow.cpp
-
-HEADERS += \
- editorwindow.h
-
-FORMS += \
- editorwindow.ui
diff --git a/editor/editor.pro.user b/editor/editor.pro.user
deleted file mode 100644
index 9432df0a..00000000
--- a/editor/editor.pro.user
+++ /dev/null
@@ -1,336 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 4.3.1, 2017-09-10T12:59:59. -->
-<qtcreator>
- <data>
- <variable>EnvironmentId</variable>
- <value type="QByteArray">{9dce752e-6199-4873-be9d-96711f00400a}</value>
- </data>
- <data>
- <variable>ProjectExplorer.Project.ActiveTarget</variable>
- <value type="int">0</value>
- </data>
- <data>
- <variable>ProjectExplorer.Project.EditorSettings</variable>
- <valuemap type="QVariantMap">
- <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
- <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
- <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
- <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
- <value type="QString" key="language">Cpp</value>
- <valuemap type="QVariantMap" key="value">
- <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
- </valuemap>
- </valuemap>
- <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
- <value type="QString" key="language">QmlJS</value>
- <valuemap type="QVariantMap" key="value">
- <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
- </valuemap>
- </valuemap>
- <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
- <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
- <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
- <value type="int" key="EditorConfiguration.IndentSize">4</value>
- <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
- <value type="int" key="EditorConfiguration.MarginColumn">80</value>
- <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
- <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
- <value type="int" key="EditorConfiguration.PaddingMode">1</value>
- <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
- <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
- <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
- <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
- <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
- <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
- <value type="int" key="EditorConfiguration.TabSize">8</value>
- <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
- <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
- <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
- <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
- <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
- <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
- </valuemap>
- </data>
- <data>
- <variable>ProjectExplorer.Project.PluginSettings</variable>
- <valuemap type="QVariantMap"/>
- </data>
- <data>
- <variable>ProjectExplorer.Project.Target.0</variable>
- <valuemap type="QVariantMap">
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{f5cdc152-9721-42b1-adce-0f96841fccff}</value>
- <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
- <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
- <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
- <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
- <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/yannherklotz/Github/YAGE/build-editor-Desktop-Debug</value>
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
- <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
- <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
- <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
- <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
- <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
- <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
- </valuemap>
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
- <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
- <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
- <value type="QString">-w</value>
- <value type="QString">-r</value>
- </valuelist>
- <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
- <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
- <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
- </valuemap>
- <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
- </valuemap>
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
- <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
- <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
- <value type="QString">-w</value>
- <value type="QString">-r</value>
- </valuelist>
- <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
- <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
- <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
- </valuemap>
- <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
- </valuemap>
- <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
- <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
- <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
- <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
- <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
- </valuemap>
- <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
- <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/yannherklotz/Github/YAGE/build-editor-Desktop-Release</value>
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
- <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
- <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
- <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
- <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
- <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
- <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
- </valuemap>
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
- <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
- <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
- <value type="QString">-w</value>
- <value type="QString">-r</value>
- </valuelist>
- <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
- <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
- <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
- </valuemap>
- <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
- </valuemap>
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
- <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
- <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
- <value type="QString">-w</value>
- <value type="QString">-r</value>
- </valuelist>
- <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
- <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
- <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
- </valuemap>
- <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
- </valuemap>
- <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
- <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
- <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
- <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
- <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
- </valuemap>
- <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
- <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/yannherklotz/Github/YAGE/build-editor-Desktop-Profile</value>
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
- <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
- <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
- <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
- <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
- <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
- <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
- </valuemap>
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
- <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
- <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
- <value type="QString">-w</value>
- <value type="QString">-r</value>
- </valuelist>
- <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
- <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
- <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
- </valuemap>
- <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
- </valuemap>
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
- <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
- <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
- <value type="QString">-w</value>
- <value type="QString">-r</value>
- </valuelist>
- <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
- <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
- <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
- </valuemap>
- <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
- </valuemap>
- <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
- <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
- <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
- <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
- <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
- </valuemap>
- <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
- <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
- <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
- <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
- </valuemap>
- <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
- </valuemap>
- <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
- <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
- <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
- <value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
- <value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
- <value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
- <value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
- <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
- <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
- <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
- <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
- <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
- <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
- <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
- <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
- <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
- <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
- <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
- <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
- <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
- <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
- <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
- <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
- <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
- <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
- <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
- <value type="int">0</value>
- <value type="int">1</value>
- <value type="int">2</value>
- <value type="int">3</value>
- <value type="int">4</value>
- <value type="int">5</value>
- <value type="int">6</value>
- <value type="int">7</value>
- <value type="int">8</value>
- <value type="int">9</value>
- <value type="int">10</value>
- <value type="int">11</value>
- <value type="int">12</value>
- <value type="int">13</value>
- <value type="int">14</value>
- </valuelist>
- <value type="int" key="PE.EnvironmentAspect.Base">2</value>
- <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">editor</value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
- <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/yannherklotz/Github/YAGE/editor/editor.pro</value>
- <value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
- <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
- <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">editor.pro</value>
- <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
- <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
- <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/home/yannherklotz/Github/YAGE/build-editor-Desktop-Debug</value>
- <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
- <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
- <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
- <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
- <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
- <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
- </valuemap>
- <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
- </valuemap>
- </data>
- <data>
- <variable>ProjectExplorer.Project.TargetCount</variable>
- <value type="int">1</value>
- </data>
- <data>
- <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
- <value type="int">18</value>
- </data>
- <data>
- <variable>Version</variable>
- <value type="int">18</value>
- </data>
-</qtcreator>
diff --git a/editor/editorwindow.cpp b/editor/editorwindow.cpp
deleted file mode 100644
index aad84612..00000000
--- a/editor/editorwindow.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-/* ----------------------------------------------------------------------------
- * /home/yannherklotz/Github/YAGE/editor/editorwindow.cpp
- *
- * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
- * MIT License, see LICENSE file for more details.
- * ----------------------------------------------------------------------------
- */
-
-#include "editorwindow.h"
-#include "ui_editorwindow.h"
-
-EditorWindow::EditorWindow(QWidget *parent) :
- QMainWindow(parent),
- ui(new Ui::EditorWindow)
-{
- ui->setupUi(this);
-}
-
-EditorWindow::~EditorWindow()
-{
- delete ui;
-}
-
-void EditorWindow::on_openGLWidget_destroyed()
-{
-}
diff --git a/editor/editorwindow.h b/editor/editorwindow.h
deleted file mode 100644
index 1e3e8045..00000000
--- a/editor/editorwindow.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef EDITORWINDOW_H
-#define EDITORWINDOW_H
-
-#include <QMainWindow>
-
-namespace Ui {
-class EditorWindow;
-}
-
-class EditorWindow : public QMainWindow
-{
- Q_OBJECT
-
-public:
- explicit EditorWindow(QWidget *parent = 0);
- ~EditorWindow();
-
-private slots:
- void on_openGLWidget_destroyed();
-
-private:
- Ui::EditorWindow *ui;
-};
-
-#endif // EDITORWINDOW_H
diff --git a/editor/editorwindow.ui b/editor/editorwindow.ui
deleted file mode 100644
index 63fd4940..00000000
--- a/editor/editorwindow.ui
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>EditorWindow</class>
- <widget class="QMainWindow" name="EditorWindow">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>1920</width>
- <height>1080</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>EditorWindow</string>
- </property>
- <widget class="QWidget" name="centralWidget">
- <widget class="QOpenGLWidget" name="openGLWidget">
- <property name="geometry">
- <rect>
- <x>110</x>
- <y>80</y>
- <width>1071</width>
- <height>431</height>
- </rect>
- </property>
- </widget>
- </widget>
- <widget class="QMenuBar" name="menuBar">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>1920</width>
- <height>22</height>
- </rect>
- </property>
- <widget class="QMenu" name="menuYage_Editor">
- <property name="title">
- <string>File</string>
- </property>
- <addaction name="actionNew_Game"/>
- </widget>
- <widget class="QMenu" name="menuEdit">
- <property name="title">
- <string>Edit</string>
- </property>
- </widget>
- <addaction name="menuYage_Editor"/>
- <addaction name="menuEdit"/>
- </widget>
- <widget class="QToolBar" name="mainToolBar">
- <attribute name="toolBarArea">
- <enum>TopToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak">
- <bool>false</bool>
- </attribute>
- </widget>
- <widget class="QStatusBar" name="statusBar"/>
- <action name="actionNew_Game">
- <property name="text">
- <string>New Game</string>
- </property>
- </action>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <resources/>
- <connections/>
-</ui>
diff --git a/editor/main.cpp b/editor/main.cpp
deleted file mode 100644
index bc80117b..00000000
--- a/editor/main.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-/* ----------------------------------------------------------------------------
- * /home/yannherklotz/Github/YAGE/editor/main.cpp
- *
- * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
- * MIT License, see LICENSE file for more details.
- * ----------------------------------------------------------------------------
- */
-
-#include "editorwindow.h"
-#include <QApplication>
-
-int main(int argc, char *argv[])
-{
- QApplication a(argc, argv);
- EditorWindow w;
- w.show();
-
- return a.exec();
-}
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
new file mode 100644
index 00000000..16b20795
--- /dev/null
+++ b/examples/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(simplegame simplegame/main.cpp)
+target_link_libraries(simplegame yage)
diff --git a/tests/resources/dngn_blood_fountain.png b/examples/simplegame/dngn_blood_fountain.png
index 7214fd47..7214fd47 100644
--- a/tests/resources/dngn_blood_fountain.png
+++ b/examples/simplegame/dngn_blood_fountain.png
Binary files differ
diff --git a/tests/simplegame.cpp b/examples/simplegame/main.cpp
index d4c7b266..a631e45b 100644
--- a/tests/simplegame.cpp
+++ b/examples/simplegame/main.cpp
@@ -22,15 +22,16 @@ int main()
window.create("Simple Game", 800, 640);
SpriteBatch sp;
- program.defaultSetup();
+ program.compileShadersFromFile("examples/simplegame/textureshader.vert",
+ "examples/simplegame/textureshader.frag");
+ program.linkShaders();
- Texture fountain =
- ResourceManager::getTexture("/home/yannherklotz/Github/YAGE/tests/"
- "resources/dngn_blood_fountain.png");
+ Texture fountain = ResourceManager::getTexture(
+ "examples/simplegame/dngn_blood_fountain.png");
cout << "texture: " << fountain.width << ", " << fountain.height << '\n';
- Camera2D camera(800, 640);
+ Camera camera(800, 640);
while (!window.shouldClose()) {
window.clearBuffer();
@@ -43,13 +44,14 @@ int main()
GLint texture_location = program.getUniformLocation("texture_sampler");
glUniform1i(texture_location, 0);
- sp.draw({0.f, 0.f, 64.f, 64.f}, {0, 0, 1, 1}, fountain.id, Colour(), 0);
+ sp.draw({0.f, 0.f, 64.f, 64.f}, {0, 0, 1, 1}, fountain.id,
+ Colour(255, 0, 255, 255), 0);
sp.render();
glBindTexture(GL_TEXTURE_2D, 0);
program.unuse();
- window.pollEvents();
window.swapBuffer();
+ window.pollEvents();
}
}
diff --git a/examples/simplegame/textureshader.frag b/examples/simplegame/textureshader.frag
new file mode 100644
index 00000000..ef728b04
--- /dev/null
+++ b/examples/simplegame/textureshader.frag
@@ -0,0 +1,16 @@
+#version 450
+
+layout(location = 0) in vec2 fragment_position;
+layout(location = 1) in vec4 fragment_colour;
+layout(location = 2) in vec2 fragment_uv;
+
+out vec4 colour;
+
+uniform sampler2D texture_sampler;
+
+void main()
+{
+ vec4 texture_color = texture(texture_sampler, fragment_uv);
+
+ colour = texture_color * fragment_colour;
+}
diff --git a/resources/defaultshader.vert b/examples/simplegame/textureshader.vert
index 2eba9bcf..3277d8b0 100644
--- a/resources/defaultshader.vert
+++ b/examples/simplegame/textureshader.vert
@@ -1,12 +1,12 @@
-#version 130
+#version 450
-in vec2 vertex_position;
-in vec4 vertex_colour;
-in vec2 vertex_uv;
+layout(location = 0) in vec2 vertex_position;
+layout(location = 1) in vec4 vertex_colour;
+layout(location = 2) in vec2 vertex_uv;
-out vec2 fragment_position;
-out vec4 fragment_colour;
-out vec2 fragment_uv;
+layout(location = 0) out vec2 fragment_position;
+layout(location = 1) out vec4 fragment_colour;
+layout(location = 2) out vec2 fragment_uv;
uniform mat4 P;
diff --git a/lib/glad b/external/glad
-Subproject 1e168396e9f457a26523a80a6ae704558413eb6
+Subproject 1e168396e9f457a26523a80a6ae704558413eb6
diff --git a/external/glfw b/external/glfw
new file mode 160000
+Subproject 84077401e96e243ffd29939475951ee95c4505a
diff --git a/external/glm b/external/glm
new file mode 160000
+Subproject 1190ae0b0e6ab38dc4a650ce7ad79be66a7a4de
diff --git a/external/rapidjson b/external/rapidjson
new file mode 160000
+Subproject 802ece6d7c29611e26a31e8d22f9f28a887fa30
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
deleted file mode 100644
index 017e8206..00000000
--- a/lib/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# ----------------------------------------------------------------------------
-# CMakeLists.txt
-#
-# Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
-# See file LICENSE for more details
-# ----------------------------------------------------------------------------
-
-set(LIBRARY_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
-
-if(UNIT_TESTS)
- # Initializing google test
- # prevents overriding the parent project's compiler/linter settings on windows
- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
- set(BUILD_GTEST ON CACHE BOOL "" FORCE)
- set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)
-
- # Add googletest directly to our build. This defines
- # the gtest and gtest_main targets.
- add_subdirectory(${LIBRARY_DIRECTORY}/googletest)
-
- # The gtest/gtest_main targets carry header search path
- # dependencies automatically when using CMake 2.8.11 or
- # later. Otherwise we have to add them here ourselves.
- if (CMAKE_VERSION VERSION_LESS 2.8.11)
- include_directories(${gtest_SOURCE_DIR}/include)
- endif()
-endif()
-
-include_directories(${LIBRARY_DIRECTORY}/rapidjson/include)
-
-# setting up glfw
-set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
-set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
-set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
-add_subdirectory(${LIBRARY_DIRECTORY}/glfw)
-
-add_subdirectory(${LIBRARY_DIRECTORY}/glad)
diff --git a/lib/glfw b/lib/glfw
deleted file mode 160000
-Subproject 999f3556fdd80983b10051746264489f2cb1ef1
diff --git a/lib/googletest b/lib/googletest
deleted file mode 160000
-Subproject d175c8bf823e709d570772b038757fadf63bc63
diff --git a/lib/rapidjson b/lib/rapidjson
deleted file mode 160000
-Subproject 5aa79b72721b7c8f8efa2fd65ae99912a67c921
diff --git a/resources/defaultshader.frag b/resources/defaultshader.frag
deleted file mode 100644
index 1d8219a5..00000000
--- a/resources/defaultshader.frag
+++ /dev/null
@@ -1,16 +0,0 @@
-#version 130
-
-in vec2 fragment_position;
-in vec4 fragment_colour;
-in vec2 fragment_uv;
-
-out vec4 colour;
-
-uniform sampler2D texture_sampler;
-
-void main()
-{
- vec4 texture_color = texture(texture_sampler, fragment_uv);
-
- colour = texture_color;
-}
diff --git a/resources/textureshader.frag b/resources/textureshader.frag
new file mode 100644
index 00000000..ef728b04
--- /dev/null
+++ b/resources/textureshader.frag
@@ -0,0 +1,16 @@
+#version 450
+
+layout(location = 0) in vec2 fragment_position;
+layout(location = 1) in vec4 fragment_colour;
+layout(location = 2) in vec2 fragment_uv;
+
+out vec4 colour;
+
+uniform sampler2D texture_sampler;
+
+void main()
+{
+ vec4 texture_color = texture(texture_sampler, fragment_uv);
+
+ colour = texture_color * fragment_colour;
+}
diff --git a/resources/textureshader.vert b/resources/textureshader.vert
new file mode 100644
index 00000000..3277d8b0
--- /dev/null
+++ b/resources/textureshader.vert
@@ -0,0 +1,23 @@
+#version 450
+
+layout(location = 0) in vec2 vertex_position;
+layout(location = 1) in vec4 vertex_colour;
+layout(location = 2) in vec2 vertex_uv;
+
+layout(location = 0) out vec2 fragment_position;
+layout(location = 1) out vec4 fragment_colour;
+layout(location = 2) out vec2 fragment_uv;
+
+uniform mat4 P;
+
+void main()
+{
+ gl_Position.xy = (P*vec4(vertex_position, 0.0, 1.0)).xy;
+ gl_Position.z = 0.0;
+ gl_Position.w = 1.0;
+
+ fragment_position = vertex_position;
+ fragment_colour = vertex_colour;
+ fragment_uv = vec2(vertex_uv.x, 1-vertex_uv.y);
+
+}
diff --git a/scripts/travis_build b/scripts/travis_build
new file mode 100755
index 00000000..40c774eb
--- /dev/null
+++ b/scripts/travis_build
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+# check compiler versions
+$CC --version
+$CXX --version
+
+# go to correct directory
+cd $TRAVIS_BUILD_DIR
+
+# start building
+mkdir -p build
+cd build
+cmake ..
+make
+cd tests
+ctest
+cd ../..
+
+# update docs if we are on the master branch
+if [[ $TRAVIS_BRANCH = "master" && $BUILD_DOCS -eq 1 ]]; then
+ if [[ -d "$TRAVIS_BUILD_DIR/build/doc_doxygen/html" ]]; then
+ git clone -b gh-pages "https://$GH_TOKEN@github.com/ymherklotz/YAGE.git" YAGE_gh-pages
+ cd YAGE_gh-pages
+ git config user.name "TravisBot"
+ git config user.email ""
+ rm -rf *
+ cp -r ../build/doc_doxygen/html/* .
+ git add -A .
+ git commit -m "[Travis] Rebuilding documentation"
+ git push -q origin gh-pages
+ cd ..
+ fi
+fi
diff --git a/scripts/update_docs b/scripts/update_docs
deleted file mode 100755
index cf117f73..00000000
--- a/scripts/update_docs
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-
-if [[ "$TRAVIS_BRANCH" == "master" ]]; then
- doxygen ./docs/Doxyfile
- if [ -d "$TRAVIS_BUILD_DIR/html" ]; then
- git clone -b gh-pages "https://$GH_TOKEN@github.com/ymherklotz/YAGE.git" YAGE_gh-pages
- cd YAGE_gh-pages
- git config user.name "TravisBot"
- git config user.email ""
- rm -rf *
- cp -r ../html/* .
- git add -A .
- git commit -m "Rebuilding documentation"
- git push -q origin gh-pages
- cd ..
- fi
-fi
diff --git a/scripts/update_version b/scripts/update_version
deleted file mode 100755
index 9c618fa6..00000000
--- a/scripts/update_version
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env python
-# -----------------------------------------------------------------------------
-# @file: add_version_headers
-#
-# Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
-# MIT License, see LICENSE file for more details.
-# -----------------------------------------------------------------------------
-
-
-import os
-import re
-import sys
-
-
-def main(argv):
- cwd = os.path.join(os.getcwd(), argv[2])
- cmake = os.path.join(cwd, "CMakeLists.txt")
- doxyfile = os.path.join(cwd, "docs", "Doxyfile")
-
- with open(cmake, "r+") as f_:
- src = f_.read()
- f_.seek(0)
- src = re.sub(r"(project\(\w+\s+VERSION\s+)[0-9.]+", r"\g<1>{0}.0".format(argv[1]), src, re.MULTILINE)
- f_.write(src)
- f_.truncate()
-
- with open(doxyfile, "r+") as f_:
- src = f_.read()
- f_.seek(0)
- src = re.sub(r"(PROJECT_NUMBER\s+=\s+v)[0-9.]+", r"\g<1>{0}".format(argv[1]), src, re.MULTILINE)
- f_.write(src)
- f_.truncate()
-
- return 0
-
-
-if __name__ == "__main__":
- sys.exit(main(sys.argv))
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 00000000..36afa574
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Initializing google test
+# prevents overriding the parent project's compiler/linter settings on windows
+set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+set(BUILD_GTEST ON CACHE BOOL "" FORCE)
+set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)
+
+# Add googletest directly to our build. This defines
+# the gtest and gtest_main targets.
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/googletest)
+
+# enable tests
+enable_testing()
+set(SIMULATION_RUNS 1000)
+
+function(make_test test_name cycles)
+ add_executable("${test_name}test" ${test_name}/test.cpp)
+ target_link_libraries("${test_name}test"
+ gtest_main
+ yage)
+ add_test(NAME ${test_name} COMMAND "${test_name}test" --gtest_repeat=${cycles} --gtest_break_on_failure)
+endfunction(make_test)
+
+make_test(yage 1)
+make_test(matrix ${SIMULATION_RUNS})
+make_test(particlebody 100)
+make_test(window ${SIMULATION_RUNS})
+make_test(spritesheet ${SIMULATION_RUNS})
+make_test(vector3 ${SIMULATION_RUNS})
+make_test(vector4 ${SIMULATION_RUNS})
+make_test(log 1)
+make_test(thread 1)
+make_test(syncqueue 1)
+make_test(active 1)
+make_test(struct ${SIMULATION_RUNS})
diff --git a/tests/activetest.cpp b/tests/active/test.cpp
index 3d561283..3d561283 100644
--- a/tests/activetest.cpp
+++ b/tests/active/test.cpp
diff --git a/tests/external/googletest b/tests/external/googletest
new file mode 160000
+Subproject 5490beb0602eab560fa3969a4410e11d94bf12a
diff --git a/tests/logtest.cpp b/tests/log/test.cpp
index e1010754..e1010754 100644
--- a/tests/logtest.cpp
+++ b/tests/log/test.cpp
diff --git a/tests/matrixtest.cpp b/tests/matrix/test.cpp
index 1e316502..1e316502 100644
--- a/tests/matrixtest.cpp
+++ b/tests/matrix/test.cpp
diff --git a/tests/particlebodytest.cpp b/tests/particlebody/test.cpp
index 09277826..09277826 100644
--- a/tests/particlebodytest.cpp
+++ b/tests/particlebody/test.cpp
diff --git a/tests/rendertest.cpp b/tests/rendertest.cpp
deleted file mode 100644
index 74476ef8..00000000
--- a/tests/rendertest.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-/** ---------------------------------------------------------------------------
- * @file: rendertest.cpp
- *
- * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
- * MIT License, see LICENSE file for more details.
- * ----------------------------------------------------------------------------
- */
-
-#include "rendertest.h"
-
-RenderTest::RenderTest(std::string sprite) : sprite_(sprite) {}
-
-void RenderTest::render() {}
diff --git a/tests/rendertest.h b/tests/rendertest.h
deleted file mode 100644
index db0e06e2..00000000
--- a/tests/rendertest.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/** ---------------------------------------------------------------------------
- * @file: rendertest.h
- *
- * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
- * MIT License, see LICENSE file for more details.
- * ----------------------------------------------------------------------------
- */
-
-#include <string>
-
-class RenderTest
-{
-public:
- RenderTest(std::string sprite);
- void render();
-
-private:
- std::string sprite_;
-};
diff --git a/tests/resources/simplegame.frag b/tests/resources/simplegame.frag
deleted file mode 100644
index e69de29b..00000000
--- a/tests/resources/simplegame.frag
+++ /dev/null
diff --git a/tests/resources/simplegame.vert b/tests/resources/simplegame.vert
deleted file mode 100644
index e69de29b..00000000
--- a/tests/resources/simplegame.vert
+++ /dev/null
diff --git a/tests/resources/floor_atlas.json b/tests/spritesheet/floor_atlas.json
index ff9f0aa1..ff9f0aa1 100644
--- a/tests/resources/floor_atlas.json
+++ b/tests/spritesheet/floor_atlas.json
diff --git a/tests/resources/floor_atlas.png b/tests/spritesheet/floor_atlas.png
index 61a5e90a..61a5e90a 100644
--- a/tests/resources/floor_atlas.png
+++ b/tests/spritesheet/floor_atlas.png
Binary files differ
diff --git a/tests/spritesheettest.cpp b/tests/spritesheet/test.cpp
index fcfc842c..fcfc842c 100644
--- a/tests/spritesheettest.cpp
+++ b/tests/spritesheet/test.cpp
diff --git a/tests/structtest.cpp b/tests/struct/test.cpp
index 99752abb..99752abb 100644
--- a/tests/structtest.cpp
+++ b/tests/struct/test.cpp
diff --git a/tests/syncqueuetest.cpp b/tests/syncqueue/test.cpp
index 1d7d8037..1d7d8037 100644
--- a/tests/syncqueuetest.cpp
+++ b/tests/syncqueue/test.cpp
diff --git a/tests/threadtest.cpp b/tests/thread/test.cpp
index 0527665a..0527665a 100644
--- a/tests/threadtest.cpp
+++ b/tests/thread/test.cpp
diff --git a/tests/vector3test.cpp b/tests/vector3/test.cpp
index 570a5c10..570a5c10 100644
--- a/tests/vector3test.cpp
+++ b/tests/vector3/test.cpp
diff --git a/tests/vector4test.cpp b/tests/vector4/test.cpp
index 53554a25..53554a25 100644
--- a/tests/vector4test.cpp
+++ b/tests/vector4/test.cpp
diff --git a/tests/windowtest.cpp b/tests/window/test.cpp
index 40b7e664..40b7e664 100644
--- a/tests/windowtest.cpp
+++ b/tests/window/test.cpp
diff --git a/tests/yagetest.cpp b/tests/yage/test.cpp
index a599eba2..a599eba2 100644
--- a/tests/yagetest.cpp
+++ b/tests/yage/test.cpp
diff --git a/yage/CMakeLists.txt b/yage/CMakeLists.txt
deleted file mode 100644
index 83a6e054..00000000
--- a/yage/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-cmake_policy(SET CMP0048 NEW)
-
-file(GLOB YAGE_CORE_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} core/*.cpp)
-file(GLOB YAGE_MATH_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} math/*.cpp)
-file(GLOB YAGE_PHYSICS_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} physics/*.cpp)
-file(GLOB YAGE_UTIL_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} util/*.cpp)
-file(GLOB YAGE_CURRENT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
-
-set(YAGE_SOURCES
- ${YAGE_CORE_SOURCES}
- ${YAGE_PHYSICS_SOURCES}
- ${YAGE_MATH_SOURCES}
- ${YAGE_UTIL_SOURCES}
- ${YAGE_CURRENT_SOURCES})
-
-set(${PROJECT_NAME}_DIR
- ${PROJECT_SOURCE_DIR})
-
-add_library(${PROJECT_NAME}
- ${YAGE_SOURCES})
-
-target_include_directories(${PROJECT_NAME}
- PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
- ${OPENGL_INCLUDE_DIR})
-
-target_link_libraries(${PROJECT_NAME}
- ${OPENGL_gl_LIBRARY}
- glfw
- glad)
diff --git a/yage/core/camera2d.cpp b/yage/core/camera2d.cpp
index 89d41ab5..463dd0d2 100644
--- a/yage/core/camera2d.cpp
+++ b/yage/core/camera2d.cpp
@@ -14,14 +14,14 @@
namespace yage
{
-Camera2D::Camera2D(int screen_width, int screen_height)
+Camera::Camera(int screen_width, int screen_height)
: position_(0.f, 0.f), camera_matrix_(1.f),
ortho_matrix_(
glm::ortho(0.f, (float)screen_width, 0.f, (float)screen_height))
{
}
-void Camera2D::update(GlslProgram &program)
+void Camera::update(GlslProgram &program)
{
if (update_matrix_) {
glm::vec3 translate(-position_.x, -position_.y, 0.f);
@@ -37,7 +37,7 @@ void Camera2D::update(GlslProgram &program)
glUniformMatrix4fv(matrix_location, 1, GL_FALSE, &(camera_matrix_[0][0]));
}
-void Camera2D::move(const glm::vec2 &direction)
+void Camera::move(const glm::vec2 &direction)
{
position_ += direction;
update_matrix_ = true;
diff --git a/yage/core/camera2d.h b/yage/core/camera2d.h
index db941aee..109333d6 100644
--- a/yage/core/camera2d.h
+++ b/yage/core/camera2d.h
@@ -17,7 +17,7 @@ namespace yage
class GlslProgram;
-class Camera2D
+class Camera
{
private:
bool update_matrix_ = true;
@@ -27,7 +27,7 @@ private:
glm::mat4 ortho_matrix_;
public:
- Camera2D(int screen_width = 1280, int screen_height = 720);
+ Camera(int screen_width = 1280, int screen_height = 720);
void update(GlslProgram &program);
void move(const glm::vec2 &direction);
diff --git a/yage/core/input.h b/yage/core/input.h
new file mode 100644
index 00000000..3882e11c
--- /dev/null
+++ b/yage/core/input.h
@@ -0,0 +1,142 @@
+#ifndef YAGE_CORE_INPUT_H
+#define YAGE_CORE_INPUT_H
+
+#include <GLFW/glfw3.h>
+
+namespace yage
+{
+
+enum class key {
+ // unknown key
+ UNKNOWN = GLFW_KEY_UNKNOWN,
+
+ // actual keys
+ SPACE = GLFW_KEY_SPACE,
+ APOSTROPHE = GLFW_KEY_APOSTROPHE, /* ' */
+ COMMA = GLFW_KEY_COMMA, /* , */
+ MINUS = GLFW_KEY_MINUS, /* - */
+ PERIOD = GLFW_KEY_PERIOD, /* . */
+ SLASH = GLFW_KEY_SLASH, /* / */
+ NUM0 = GLFW_KEY_0,
+ NUM1 = GLFW_KEY_1,
+ NUM2 = GLFW_KEY_2,
+ NUM3 = GLFW_KEY_3,
+ NUM4 = GLFW_KEY_4,
+ NUM5 = GLFW_KEY_5,
+ NUM6 = GLFW_KEY_6,
+ NUM7 = GLFW_KEY_7,
+ NUM8 = GLFW_KEY_8,
+ NUM9 = GLFW_KEY_9,
+ SEMICOLON = GLFW_KEY_SEMICOLON, /* ; */
+ EQUAL = GLFW_KEY_EQUAL, /* = */
+ A = GLFW_KEY_A,
+ B = GLFW_KEY_B,
+ C = GLFW_KEY_C,
+ D = GLFW_KEY_D,
+ E = GLFW_KEY_E,
+ F = GLFW_KEY_F,
+ G = GLFW_KEY_G,
+ H = GLFW_KEY_H,
+ I = GLFW_KEY_I,
+ J = GLFW_KEY_J,
+ K = GLFW_KEY_K,
+ L = GLFW_KEY_L,
+ M = GLFW_KEY_M,
+ N = GLFW_KEY_N,
+ O = GLFW_KEY_O,
+ P = GLFW_KEY_P,
+ Q = GLFW_KEY_Q,
+ R = GLFW_KEY_R,
+ S = GLFW_KEY_S,
+ T = GLFW_KEY_T,
+ U = GLFW_KEY_U,
+ V = GLFW_KEY_V,
+ W = GLFW_KEY_W,
+ X = GLFW_KEY_X,
+ Y = GLFW_KEY_Y,
+ Z = GLFW_KEY_Z,
+ LEfT_BRACKET = GLFW_KEY_LEFT_BRACKET, /* [ */
+ BACKSLASH = GLFW_KEY_BACKSLASH, /* \ */
+ RIGHT_BRACKET = GLFW_KEY_RIGHT_BRACKET, /* ] */
+ GRAVE_ACCENT = GLFW_KEY_GRAVE_ACCENT, /* ` */
+ WORLD_1 = GLFW_KEY_WORLD_1, /* non-US #1 */
+ WORLD_2 = GLFW_KEY_WORLD_2, /* non-US #2 */
+
+ // function keys
+ ESCAPE = GLFW_KEY_ESCAPE,
+ ENTER = GLFW_KEY_ENTER,
+ TAB = GLFW_KEY_TAB,
+ BACKSPACE = GLFW_KEY_BACKSPACE,
+ INSERT = GLFW_KEY_INSERT,
+ DELETE = GLFW_KEY_DELETE,
+ RIGHT = GLFW_KEY_RIGHT,
+ LEFT = GLFW_KEY_LEFT,
+ DOWN = GLFW_KEY_DOWN,
+ UP = GLFW_KEY_UP,
+ PAGE_UP = GLFW_KEY_PAGE_UP,
+ PAGE_DOWN = GLFW_KEY_PAGE_DOWN,
+ HOME = GLFW_KEY_HOME,
+ END = GLFW_KEY_END,
+ CAPS_LOCK = GLFW_KEY_CAPS_LOCK,
+ SCROLL_LOCK = GLFW_KEY_SCROLL_LOCK,
+ NUM_LOCK = GLFW_KEY_NUM_LOCK,
+ PRINT_SCREEN = GLFW_KEY_PRINT_SCREEN,
+ PAUSE = GLFW_KEY_PAUSE,
+ F1 = GLFW_KEY_F1,
+ F2 = GLFW_KEY_F2,
+ F3 = GLFW_KEY_F3,
+ F4 = GLFW_KEY_F4,
+ F5 = GLFW_KEY_F5,
+ F6 = GLFW_KEY_F6,
+ F7 = GLFW_KEY_F7,
+ F8 = GLFW_KEY_F8,
+ F9 = GLFW_KEY_F9,
+ F10 = GLFW_KEY_F10,
+ F11 = GLFW_KEY_F11,
+ F12 = GLFW_KEY_F12,
+ F13 = GLFW_KEY_F13,
+ F14 = GLFW_KEY_F14,
+ F15 = GLFW_KEY_F15,
+ F16 = GLFW_KEY_F16,
+ F17 = GLFW_KEY_F17,
+ F18 = GLFW_KEY_F18,
+ F19 = GLFW_KEY_F19,
+ F20 = GLFW_KEY_F20,
+ F21 = GLFW_KEY_F21,
+ F22 = GLFW_KEY_F22,
+ F23 = GLFW_KEY_F23,
+ F24 = GLFW_KEY_F24,
+ F25 = GLFW_KEY_F25,
+ KP_0 = GLFW_KEY_KP_0,
+ KP_1 = GLFW_KEY_KP_1,
+ KP_2 = GLFW_KEY_KP_2,
+ KP_3 = GLFW_KEY_KP_3,
+ KP_4 = GLFW_KEY_KP_4,
+ KP_5 = GLFW_KEY_KP_5,
+ KP_6 = GLFW_KEY_KP_6,
+ KP_7 = GLFW_KEY_KP_7,
+ KP_8 = GLFW_KEY_KP_8,
+ KP_9 = GLFW_KEY_KP_9,
+ KP_DECIMAL = GLFW_KEY_KP_DECIMAL,
+ KP_DIVIDE = GLFW_KEY_KP_DIVIDE,
+ KP_MULTIPLY = GLFW_KEY_KP_MULTIPLY,
+ KP_SUBTRACT = GLFW_KEY_KP_SUBTRACT,
+ KP_ADD = GLFW_KEY_KP_ADD,
+ KP_ENTER = GLFW_KEY_KP_ENTER,
+ KP_EQUAL = GLFW_KEY_KP_EQUAL,
+ LEFT_SHIFT = GLFW_KEY_LEFT_SHIFT,
+ LEFT_CONTROL = GLFW_KEY_LEFT_CONTROL,
+ LEFT_ALT = GLFW_KEY_LEFT_ALT,
+ LEFT_SUPER = GLFW_KEY_LEFT_SUPER,
+ RIGHT_SHIFT = GLFW_KEY_RIGHT_SHIFT,
+ RIGHT_CONTROL = GLFW_KEY_RIGHT_CONTROL,
+ RIGHT_ALT = GLFW_KEY_RIGHT_ALT,
+ RIGHT_SUPER = GLFW_KEY_RIGHT_SUPER,
+ MENU = GLFW_KEY_MENU,
+
+ LAST = GLFW_KEY_LAST,
+};
+
+} // namepsace yage
+
+#endif
diff --git a/yage/core/resourcemanager.cpp b/yage/core/resourcemanager.cpp
index f841222b..c585a235 100644
--- a/yage/core/resourcemanager.cpp
+++ b/yage/core/resourcemanager.cpp
@@ -7,6 +7,7 @@
*/
#include "resourcemanager.h"
+#include "texture.h"
namespace yage
{
diff --git a/yage/core/resourcemanager.h b/yage/core/resourcemanager.h
index 369bf40f..a0249436 100644
--- a/yage/core/resourcemanager.h
+++ b/yage/core/resourcemanager.h
@@ -17,7 +17,6 @@
#ifndef RESOURCE_MANAGER_H
#define RESOURCE_MANAGER_H
-#include "texture.h"
#include "texturecache.h"
#include <string>
@@ -25,6 +24,8 @@
namespace yage
{
+class Texture;
+
class ResourceManager
{
private:
diff --git a/yage/core/sprite.h b/yage/core/sprite.h
index 0287fe10..35997195 100644
--- a/yage/core/sprite.h
+++ b/yage/core/sprite.h
@@ -6,9 +6,6 @@
* ----------------------------------------------------------------------------
*/
-/** @file
- */
-
#ifndef SPRITE_H
#define SPRITE_H
diff --git a/yage/core/texturecache.cpp b/yage/core/texturecache.cpp
index f9468dbb..1c61e774 100644
--- a/yage/core/texturecache.cpp
+++ b/yage/core/texturecache.cpp
@@ -6,8 +6,9 @@
* ----------------------------------------------------------------------------
*/
-#include <yage/core/imageloader.h>
-#include <yage/core/texturecache.h>
+#include "texturecache.h"
+#include "imageloader.h"
+#include "texture.h"
namespace yage
{
diff --git a/yage/core/window.cpp b/yage/core/window.cpp
index 9696f2bb..70e8d8e3 100644
--- a/yage/core/window.cpp
+++ b/yage/core/window.cpp
@@ -16,10 +16,13 @@ namespace yage
void key_callback(GLFWwindow *window, int key, int scanCode, int action,
int mods)
{
- if (key == GLFW_KEY_E && action == GLFW_PRESS) {
+ if (key == GLFW_KEY_E && (action == GLFW_REPEAT || action == GLFW_PRESS)) {
glClearColor(0.5f, 0.f, 0.f, 1.f);
+ } else if (key == GLFW_KEY_Q &&
+ (action == GLFW_REPEAT || action == GLFW_PRESS)) {
+ glClearColor(0.f, 0.f, 0.5f, 1.f);
} else {
- glClearColor(0.f, 0.5f, 0.f, 1.f);
+ glClearColor(0.f, .5f, 0.f, 1.f);
}
}
@@ -37,8 +40,9 @@ void Window::create(std::string window_name, int width, int height)
throw std::runtime_error("GLFW Initialisation failed");
}
- glfwWindowHint(GLFW_VERSION_MAJOR, 4);
- glfwWindowHint(GLFW_VERSION_MINOR, 5);
+ glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
+ glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 5);
+ glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
window_ =
glfwCreateWindow(width, height, window_name.c_str(), nullptr, nullptr);
@@ -97,6 +101,10 @@ bool Window::shouldClose()
void Window::pollEvents() const
{
glfwPollEvents();
+
+ if (glfwGetKey(window_, GLFW_KEY_W) == GLFW_PRESS) {
+ glClearColor(0.f, 0.5f, 0.5f, 1.f);
+ }
}
} // namespace yage
diff --git a/yage/physics/particlebody.h b/yage/physics/particlebody.h
index 2e7a4f88..3978da77 100644
--- a/yage/physics/particlebody.h
+++ b/yage/physics/particlebody.h
@@ -10,7 +10,6 @@
#define YAGE_PHYSICS_PARTICLE_BODY_H
#include "body.h"
-
#include <math/matrix.h>
namespace yage
diff --git a/yage/yage.h b/yage/yage.h
index 3dd27eb8..3e8ac47b 100644
--- a/yage/yage.h
+++ b/yage/yage.h
@@ -6,11 +6,6 @@
* ----------------------------------------------------------------------------
*/
-/** @file Includes all the headers in the main yage project.
- *
- * This does not include
- */
-
#ifndef YAGE_YAGE_H
#define YAGE_YAGE_H