patches against Skybolt master d7de7172be13f64815e9746138613b61d0b09536
This commit is contained in:
parent
07d98b8654
commit
ba9ffcf102
31
Dockerfile
31
Dockerfile
@ -6,7 +6,10 @@ RUN apt update -y
|
|||||||
RUN apt install -y git cmake make gcc g++ libboost-dev libgl-dev
|
RUN apt install -y git cmake make gcc g++ libboost-dev libgl-dev
|
||||||
RUN apt install -y libboost-date-time-dev libboost-thread-dev libboost-log-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev
|
RUN apt install -y libboost-date-time-dev libboost-thread-dev libboost-log-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev
|
||||||
RUN apt install -y libopenscenegraph-dev
|
RUN apt install -y libopenscenegraph-dev
|
||||||
RUN apt install -y vim xterm
|
RUN apt install -y qtbase5-dev
|
||||||
|
RUN apt install -y wget unzip
|
||||||
|
RUN apt install -y vim xterm mesa-utils # for debugging only
|
||||||
|
RUN apt install -y libgl1-mesa-glx # for intel gpu hardware acceleration
|
||||||
|
|
||||||
## OIS
|
## OIS
|
||||||
|
|
||||||
@ -17,6 +20,12 @@ RUN cmake ..
|
|||||||
RUN make -j5
|
RUN make -j5
|
||||||
RUN make install
|
RUN make install
|
||||||
|
|
||||||
|
## CIGI CCL
|
||||||
|
|
||||||
|
WORKDIR /usr/src
|
||||||
|
RUN wget 'https://udomain.dl.sourceforge.net/project/cigi/CIGI%20Class%20Library%20%28CCL%29/CCL%20Version%204.0.6a/ccl_4_0%20rev6a.zip'
|
||||||
|
RUN unzip 'ccl_4_0 rev6a.zip' && cd 'ccl_4_0 rev6a' && sh ./configure && make -j5 && make install
|
||||||
|
|
||||||
## SkyboltDependenciesHeaderOnly
|
## SkyboltDependenciesHeaderOnly
|
||||||
|
|
||||||
WORKDIR /usr/src
|
WORKDIR /usr/src
|
||||||
@ -25,10 +34,12 @@ ENV SKYBOLT_DEPS=/usr/src/SkyboltDependenciesHeaderOnly
|
|||||||
|
|
||||||
## Skybolt + patches
|
## Skybolt + patches
|
||||||
|
|
||||||
|
RUN echo patches against Skybolt master d7de7172be13f64815e9746138613b61d0b09536
|
||||||
|
|
||||||
WORKDIR /usr/src
|
WORKDIR /usr/src
|
||||||
RUN git clone https://github.com/Piraxus/Skybolt.git
|
RUN git clone https://github.com/Piraxus/Skybolt.git
|
||||||
WORKDIR /usr/src/Skybolt/build
|
WORKDIR /usr/src/Skybolt/build
|
||||||
COPY patches/*.patch ./
|
COPY patches/skybolt/*.patch ./
|
||||||
RUN \
|
RUN \
|
||||||
git config --global user.email "you@example.com" && \
|
git config --global user.email "you@example.com" && \
|
||||||
git config --global user.name "Your Name"
|
git config --global user.name "Your Name"
|
||||||
@ -40,11 +51,19 @@ RUN json_DIR=${SKYBOLT_DEPS}/json \
|
|||||||
earcut_DIR=${SKYBOLT_DEPS}/earcut \
|
earcut_DIR=${SKYBOLT_DEPS}/earcut \
|
||||||
httplib_DIR=${SKYBOLT_DEPS}/httplib \
|
httplib_DIR=${SKYBOLT_DEPS}/httplib \
|
||||||
px_sched_DIR=${SKYBOLT_DEPS}/px_sched \
|
px_sched_DIR=${SKYBOLT_DEPS}/px_sched \
|
||||||
OGRE_DEPENDENCIES_DIR=/usr/local/include/ois \
|
OGRE_DEPENDENCIES_DIR="/usr/local" \
|
||||||
cmake .. \
|
cmake .. \
|
||||||
-D CMAKE_CXX_COMPILER=g++ \
|
-D CMAKE_CXX_COMPILER=g++ \
|
||||||
-D CMAKE_CXX_STANDARD=17 -D CMAKE_CXX_STANDARD_REQUIRED=ON \
|
-D CMAKE_CXX_FLAGS="-DBOOST_LOG_DYN_LINK -Wno-register" \
|
||||||
-D CMAKE_CXX_FLAGS="-DBOOST_LOG_DYN_LINK -Wno-register"
|
-D CMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||||
|
-D BUILD_CIGI_COMPONENT_PLUGIN=ON
|
||||||
|
RUN (cd src/Skybolt/SkyboltVisTests && ln -s ../../../.. Source)
|
||||||
RUN make -j5
|
RUN make -j5
|
||||||
|
|
||||||
## RUN make test
|
## Asset packages
|
||||||
|
|
||||||
|
WORKDIR /usr/src/Skybolt/Assets
|
||||||
|
COPY Core_1_0_0.zip EarthMed_1_0_0.zip Seattle_1_0_0.zip ./
|
||||||
|
RUN unzip Core_1_0_0.zip && unzip EarthMed_1_0_0.zip && unzip Seattle_1_0_0.zip
|
||||||
|
|
||||||
|
WORKDIR /usr/src/Skybolt
|
||||||
|
9
Makefile
9
Makefile
@ -2,14 +2,15 @@ NAME=skybolt
|
|||||||
|
|
||||||
all:
|
all:
|
||||||
docker build -f Dockerfile -t $(NAME) .
|
docker build -f Dockerfile -t $(NAME) .
|
||||||
docker run -it $(NAME) make test
|
|
||||||
|
|
||||||
all-no-cache:
|
all-no-cache:
|
||||||
docker build --no-cache -f Dockerfile -t $(NAME) .
|
docker build --no-cache -f Dockerfile -t $(NAME) .
|
||||||
docker run -it $(NAME) make test
|
|
||||||
|
|
||||||
sh:
|
sh:
|
||||||
docker run -it $(NAME) bash
|
docker run -it $(NAME) bash
|
||||||
|
|
||||||
xterm:
|
intel-test:
|
||||||
x11docker $(NAME) xterm
|
xhost + && docker run -it --volume=/tmp/.X11-unix:/tmp/.X11-unix --device=/dev/dri:/dev/dri --env="DISPLAY=$$DISPLAY" skybolt sh -c 'cd build && make test'
|
||||||
|
|
||||||
|
intel-sh:
|
||||||
|
xhost + && docker run -it --volume=/tmp/.X11-unix:/tmp/.X11-unix --device=/dev/dri:/dev/dri --env="DISPLAY=$$DISPLAY" skybolt bash
|
||||||
|
37
README.md
37
README.md
@ -6,20 +6,45 @@ Patches and Dockerfile for building Skybolt on Linux.
|
|||||||
|
|
||||||
## Build procedure
|
## Build procedure
|
||||||
|
|
||||||
|
1. Download asset packages (`Core_1_0_0.zip` `EarthMed_1_0_0.zip` and `Seattle_1_0_0.zip`) to current directory. Source: <https://piraxus.com/downloads/assetpackages.html>
|
||||||
|
|
||||||
|
2. Build skybolt docker image
|
||||||
|
|
||||||
```
|
```
|
||||||
docker build -f Dockerfile -t skybolt .
|
docker build -f Dockerfile -t skybolt .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
The skybolt docker image requires hardware acceleration. How to enable hardware acceleration varies depending on GPU vendor.
|
||||||
|
|
||||||
|
### Intel GPU
|
||||||
|
|
||||||
|
Run tests:
|
||||||
|
|
||||||
|
```
|
||||||
|
xhost +
|
||||||
|
docker run --volume=/tmp/.X11-unix:/tmp/.X11-unix --device=/dev/dri:/dev/dri skybolt sh -c '(cd build && make test)'
|
||||||
|
```
|
||||||
|
|
||||||
|
Run MinimalApp:
|
||||||
|
|
||||||
|
```
|
||||||
|
xhost +
|
||||||
|
docker run -it --volume=/tmp/.X11-unix:/tmp/.X11-unix --device=/dev/dri:/dev/dri --env="DISPLAY=$DISPLAY" skybolt build/bin/MinimalApp
|
||||||
|
```
|
||||||
|
|
||||||
|
### NVIDIA GPU
|
||||||
|
|
||||||
|
See <https://github.com/NVIDIA/nvidia-docker>
|
||||||
|
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
* Libraries and programs building: YES
|
* Libraries and programs building: YES
|
||||||
* Tests passing: NO, some are failing:
|
* Tests passing: YES
|
||||||
|
* MinimalApp running: YES
|
||||||
|
|
||||||
```
|
|
||||||
The following tests FAILED:
|
|
||||||
50 - Precomputed BruentonAtmosphere matches Bruenton's reference implementation (Failed)
|
|
||||||
51 - CompositingPipeline renders expected images (SEGFAULT)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
|
@ -1,140 +0,0 @@
|
|||||||
From f4baad0faaef0e49fc1f6fc78dcc54480e09b950 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 01/23] update include statements to work on case sensitive
|
|
||||||
file system
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/MapAttributesConverter/MapAttributesConverter.h | 2 +-
|
|
||||||
src/Skybolt/SkyboltEngine/Input/InputSystem.h | 2 +-
|
|
||||||
src/Skybolt/SkyboltEngine/Input/LogicalAxis.h | 2 +-
|
|
||||||
src/Skybolt/SkyboltEngine/SimVisBinding/VisNameLabels.cpp | 2 +-
|
|
||||||
src/Skybolt/SkyboltEngine/SimVisBinding/VisOrbits.cpp | 2 +-
|
|
||||||
src/Skybolt/SkyboltEngine/VisHud.cpp | 4 ++--
|
|
||||||
.../Renderable/Clouds/ThirdParty/TileableVolumeNoise.cpp | 2 +-
|
|
||||||
src/Skybolt/SkyboltVis/Renderable/RunwaysBatch.cpp | 2 +-
|
|
||||||
src/Skybolt/TileMapGenerator/TileMapGenerator.h | 2 +-
|
|
||||||
9 files changed, 10 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/MapAttributesConverter/MapAttributesConverter.h b/src/Skybolt/MapAttributesConverter/MapAttributesConverter.h
|
|
||||||
index 9edc03f..3fe890e 100644
|
|
||||||
--- a/src/Skybolt/MapAttributesConverter/MapAttributesConverter.h
|
|
||||||
+++ b/src/Skybolt/MapAttributesConverter/MapAttributesConverter.h
|
|
||||||
@@ -6,7 +6,7 @@
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
-#include <osg/image>
|
|
||||||
+#include <osg/Image>
|
|
||||||
|
|
||||||
namespace skybolt {
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltEngine/Input/InputSystem.h b/src/Skybolt/SkyboltEngine/Input/InputSystem.h
|
|
||||||
index 516ca42..c4f972e 100644
|
|
||||||
--- a/src/Skybolt/SkyboltEngine/Input/InputSystem.h
|
|
||||||
+++ b/src/Skybolt/SkyboltEngine/Input/InputSystem.h
|
|
||||||
@@ -10,7 +10,7 @@
|
|
||||||
#include "SkyboltSim/System/System.h"
|
|
||||||
#include "SkyboltVis/SkyboltVisFwd.h"
|
|
||||||
|
|
||||||
-#include <osg/vec2f>
|
|
||||||
+#include <osg/Vec2f>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
namespace skybolt {
|
|
||||||
diff --git a/src/Skybolt/SkyboltEngine/Input/LogicalAxis.h b/src/Skybolt/SkyboltEngine/Input/LogicalAxis.h
|
|
||||||
index 03a04d5..6273e08 100644
|
|
||||||
--- a/src/Skybolt/SkyboltEngine/Input/LogicalAxis.h
|
|
||||||
+++ b/src/Skybolt/SkyboltEngine/Input/LogicalAxis.h
|
|
||||||
@@ -7,7 +7,7 @@
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "SkyboltEngine/SkyboltEngineFwd.h"
|
|
||||||
-#include <osg/vec2f>
|
|
||||||
+#include <osg/Vec2f>
|
|
||||||
|
|
||||||
namespace skybolt {
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltEngine/SimVisBinding/VisNameLabels.cpp b/src/Skybolt/SkyboltEngine/SimVisBinding/VisNameLabels.cpp
|
|
||||||
index 7d71cce..ceab9b4 100644
|
|
||||||
--- a/src/Skybolt/SkyboltEngine/SimVisBinding/VisNameLabels.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltEngine/SimVisBinding/VisNameLabels.cpp
|
|
||||||
@@ -11,7 +11,7 @@
|
|
||||||
#include "SkyboltVis/ShaderProgramRegistry.h"
|
|
||||||
#include <osg/Depth>
|
|
||||||
#include <osg/Geode>
|
|
||||||
-#include <osgText/text>
|
|
||||||
+#include <osgText/Text>
|
|
||||||
|
|
||||||
namespace skybolt {
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltEngine/SimVisBinding/VisOrbits.cpp b/src/Skybolt/SkyboltEngine/SimVisBinding/VisOrbits.cpp
|
|
||||||
index fd48e67..4fbd299 100644
|
|
||||||
--- a/src/Skybolt/SkyboltEngine/SimVisBinding/VisOrbits.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltEngine/SimVisBinding/VisOrbits.cpp
|
|
||||||
@@ -16,7 +16,7 @@
|
|
||||||
|
|
||||||
#include <osg/Depth>
|
|
||||||
#include <osg/Geode>
|
|
||||||
-#include <osgText/text>
|
|
||||||
+#include <osgText/Text>
|
|
||||||
|
|
||||||
namespace skybolt {
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltEngine/VisHud.cpp b/src/Skybolt/SkyboltEngine/VisHud.cpp
|
|
||||||
index a4759da..de70369 100644
|
|
||||||
--- a/src/Skybolt/SkyboltEngine/VisHud.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltEngine/VisHud.cpp
|
|
||||||
@@ -6,8 +6,8 @@
|
|
||||||
|
|
||||||
#include "VisHud.h"
|
|
||||||
|
|
||||||
-#include <osg/geode>
|
|
||||||
-#include <osgText/text>
|
|
||||||
+#include <osg/Geode>
|
|
||||||
+#include <osgText/Text>
|
|
||||||
|
|
||||||
namespace skybolt {
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/Renderable/Clouds/ThirdParty/TileableVolumeNoise.cpp b/src/Skybolt/SkyboltVis/Renderable/Clouds/ThirdParty/TileableVolumeNoise.cpp
|
|
||||||
index 6dea648..af8df1c 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/Renderable/Clouds/ThirdParty/TileableVolumeNoise.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/Renderable/Clouds/ThirdParty/TileableVolumeNoise.cpp
|
|
||||||
@@ -13,7 +13,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
||||||
|
|
||||||
#include "TileableVolumeNoise.h"
|
|
||||||
|
|
||||||
-#include <glm\gtc\noise.hpp>
|
|
||||||
+#include <glm/gtc/noise.hpp>
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
// Perlin noise based on GLM http://glm.g-truc.net
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/Renderable/RunwaysBatch.cpp b/src/Skybolt/SkyboltVis/Renderable/RunwaysBatch.cpp
|
|
||||||
index 7343d50..1631599 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/Renderable/RunwaysBatch.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/Renderable/RunwaysBatch.cpp
|
|
||||||
@@ -14,7 +14,7 @@
|
|
||||||
#include <osg/Geode>
|
|
||||||
#include <osg/Geometry>
|
|
||||||
#include <osg/Texture2D>
|
|
||||||
-#include <osgText/font>
|
|
||||||
+#include <osgText/Font>
|
|
||||||
|
|
||||||
#include <boost/log/trivial.hpp>
|
|
||||||
#include <assert.h>
|
|
||||||
diff --git a/src/Skybolt/TileMapGenerator/TileMapGenerator.h b/src/Skybolt/TileMapGenerator/TileMapGenerator.h
|
|
||||||
index ebdab63..9a0af7c 100644
|
|
||||||
--- a/src/Skybolt/TileMapGenerator/TileMapGenerator.h
|
|
||||||
+++ b/src/Skybolt/TileMapGenerator/TileMapGenerator.h
|
|
||||||
@@ -7,7 +7,7 @@
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <SkyboltCommon/Math/Box2.h>
|
|
||||||
-#include <osg/image>
|
|
||||||
+#include <osg/Image>
|
|
||||||
#include <osg/Vec2i>
|
|
||||||
|
|
||||||
typedef skybolt::Box2T<osg::Vec2d> Box2d;
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 9c799de888f2af27b57683af3370f13475e8eb99 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 02/23] ShaUtility: use snprintf
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltCommon/ShaUtility.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltCommon/ShaUtility.cpp b/src/Skybolt/SkyboltCommon/ShaUtility.cpp
|
|
||||||
index bbbf5aa..153af9f 100644
|
|
||||||
--- a/src/Skybolt/SkyboltCommon/ShaUtility.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltCommon/ShaUtility.cpp
|
|
||||||
@@ -23,7 +23,7 @@ std::string calcSha1(const std::string& p_arg)
|
|
||||||
|
|
||||||
for (int i = 0; i < 5; i++)
|
|
||||||
{
|
|
||||||
- sprintf_s(buf + (i << 3), 41, "%08x", hash[i]);
|
|
||||||
+ snprintf(buf + (i << 3), 41, "%08x", hash[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return std::string(buf);
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From 34eec883ed5b9c01369e1266e608699d0143e609 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 03/23] FindOSG.cmake: linux use case
|
|
||||||
|
|
||||||
---
|
|
||||||
CMake/Modules/FindOSG.cmake | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/CMake/Modules/FindOSG.cmake b/CMake/Modules/FindOSG.cmake
|
|
||||||
index 6350213..bfce0a3 100644
|
|
||||||
--- a/CMake/Modules/FindOSG.cmake
|
|
||||||
+++ b/CMake/Modules/FindOSG.cmake
|
|
||||||
@@ -204,6 +204,8 @@ ELSE (_osg_IN_CACHE)
|
|
||||||
NAMES
|
|
||||||
${_osg_LIB_PREFIX}${COMPONENT}${_osg_LIB_VERSION}
|
|
||||||
${_osg_LIB_PREFIX}${COMPONENT}
|
|
||||||
+ ${COMPONENT}${_osg_LIB_VERSION}
|
|
||||||
+ ${COMPONENT}
|
|
||||||
PATHS ${_osg_LIBRARIES_SEARCH_DIRS}
|
|
||||||
PATH_SUFFIXES lib
|
|
||||||
)
|
|
||||||
@@ -212,6 +214,8 @@ ELSE (_osg_IN_CACHE)
|
|
||||||
NAMES
|
|
||||||
${_osg_LIB_PREFIX}${COMPONENT}${_osg_LIB_VERSION}${_osg_DEBUG_TAG}
|
|
||||||
${_osg_LIB_PREFIX}${COMPONENT}${_osg_DEBUG_TAG}
|
|
||||||
+ ${COMPONENT}${_osg_LIB_VERSION}${_osg_DEBUG_TAG}
|
|
||||||
+ ${COMPONENT}${_osg_DEBUG_TAG}
|
|
||||||
PATHS ${_osg_LIBRARIES_SEARCH_DIRS}
|
|
||||||
PATH_SUFFIXES lib
|
|
||||||
)
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
From 3708bd16802589ba6c536f797ad076dfbaea341b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 04/23] algorithm provides std::find
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltCommon/Listenable.h | 1 +
|
|
||||||
src/Skybolt/SkyboltCommon/TypedItemContainer.h | 1 +
|
|
||||||
2 files changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltCommon/Listenable.h b/src/Skybolt/SkyboltCommon/Listenable.h
|
|
||||||
index 5270bcb..38332a6 100644
|
|
||||||
--- a/src/Skybolt/SkyboltCommon/Listenable.h
|
|
||||||
+++ b/src/Skybolt/SkyboltCommon/Listenable.h
|
|
||||||
@@ -7,6 +7,7 @@
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
+#include <algorithm>
|
|
||||||
|
|
||||||
namespace skybolt
|
|
||||||
{
|
|
||||||
diff --git a/src/Skybolt/SkyboltCommon/TypedItemContainer.h b/src/Skybolt/SkyboltCommon/TypedItemContainer.h
|
|
||||||
index 8f5a772..27d2e5f 100644
|
|
||||||
--- a/src/Skybolt/SkyboltCommon/TypedItemContainer.h
|
|
||||||
+++ b/src/Skybolt/SkyboltCommon/TypedItemContainer.h
|
|
||||||
@@ -11,6 +11,7 @@
|
|
||||||
#include <memory>
|
|
||||||
#include <typeindex>
|
|
||||||
#include <vector>
|
|
||||||
+#include <algorithm>
|
|
||||||
|
|
||||||
namespace skybolt {
|
|
||||||
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 3e639ceef1112ac618998d61dc3cb48b0d4b8604 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 05/23] Box2.h depends on OsgMathHelpers.h for
|
|
||||||
componentWiseLerp etc
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltCommon/Math/Box2.h | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltCommon/Math/Box2.h b/src/Skybolt/SkyboltCommon/Math/Box2.h
|
|
||||||
index 8719292..a527678 100644
|
|
||||||
--- a/src/Skybolt/SkyboltCommon/Math/Box2.h
|
|
||||||
+++ b/src/Skybolt/SkyboltCommon/Math/Box2.h
|
|
||||||
@@ -8,6 +8,7 @@
|
|
||||||
|
|
||||||
#include <glm/glm.hpp>
|
|
||||||
#include <limits>
|
|
||||||
+#include <SkyboltVis/OsgMathHelpers.h> //componentWiseLerp etc
|
|
||||||
|
|
||||||
namespace skybolt {
|
|
||||||
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,146 +0,0 @@
|
|||||||
From 584c896e0feeaa1669b94b909d544935138b333e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 06/23] fix typename misuse (g++ 8.3.0)
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltCommon/Listenable.h | 2 +-
|
|
||||||
src/Skybolt/SkyboltCommon/Math/Box2.h | 2 +-
|
|
||||||
src/Skybolt/SkyboltCommon/Math/QuadTree.h | 32 +++++++++++------------
|
|
||||||
3 files changed, 18 insertions(+), 18 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltCommon/Listenable.h b/src/Skybolt/SkyboltCommon/Listenable.h
|
|
||||||
index 38332a6..eaca545 100644
|
|
||||||
--- a/src/Skybolt/SkyboltCommon/Listenable.h
|
|
||||||
+++ b/src/Skybolt/SkyboltCommon/Listenable.h
|
|
||||||
@@ -25,7 +25,7 @@ public:
|
|
||||||
|
|
||||||
void removeListener(Listener* listener)
|
|
||||||
{
|
|
||||||
- Listeners::iterator i = std::find(mListeners.begin(), mListeners.end(), listener);
|
|
||||||
+ typename Listeners::iterator i = std::find(mListeners.begin(), mListeners.end(), listener);
|
|
||||||
if (i != mListeners.end())
|
|
||||||
mListeners.erase(i);
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltCommon/Math/Box2.h b/src/Skybolt/SkyboltCommon/Math/Box2.h
|
|
||||||
index a527678..929dd6e 100644
|
|
||||||
--- a/src/Skybolt/SkyboltCommon/Math/Box2.h
|
|
||||||
+++ b/src/Skybolt/SkyboltCommon/Math/Box2.h
|
|
||||||
@@ -23,7 +23,7 @@ struct Box2T
|
|
||||||
Box2T(const T& minimum, const T& maximum) : minimum(minimum), maximum(maximum) {}
|
|
||||||
|
|
||||||
inline T size() const { return maximum - minimum; }
|
|
||||||
- inline T center() const { return (maximum + minimum) / T::value_type(2); }
|
|
||||||
+ inline T center() const { return (maximum + minimum) / (typename T::value_type)(2); }
|
|
||||||
|
|
||||||
inline bool intersects(const T& v) const
|
|
||||||
{
|
|
||||||
diff --git a/src/Skybolt/SkyboltCommon/Math/QuadTree.h b/src/Skybolt/SkyboltCommon/Math/QuadTree.h
|
|
||||||
index b0d722a..d5a06e1 100644
|
|
||||||
--- a/src/Skybolt/SkyboltCommon/Math/QuadTree.h
|
|
||||||
+++ b/src/Skybolt/SkyboltCommon/Math/QuadTree.h
|
|
||||||
@@ -45,7 +45,7 @@ QuadTreeTileKey createAncestorKey(const QuadTreeTileKey& key, int level);
|
|
||||||
template <class VecT, class DerivedT>
|
|
||||||
struct QuadTreeTile
|
|
||||||
{
|
|
||||||
- typedef typename VecT VectorType;
|
|
||||||
+ typedef VecT VectorType;
|
|
||||||
Box2T<VecT> bounds;
|
|
||||||
QuadTreeTileKey key;
|
|
||||||
std::unique_ptr<DerivedT> children[4];
|
|
||||||
@@ -113,7 +113,7 @@ QuadTreeTileKey getKeyAtLevelIntersectingLonLatPoint(int level, const VecType& p
|
|
||||||
template <class TileT>
|
|
||||||
struct QuadTree
|
|
||||||
{
|
|
||||||
- typedef typename TileT TileType;
|
|
||||||
+ typedef TileT TileType;
|
|
||||||
|
|
||||||
typedef std::function <std::unique_ptr<TileT>(const QuadTreeTileKey& key, const Box2T<typename TileT::VectorType>& bounds)> TileCreator;
|
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ struct QuadTree
|
|
||||||
return intersectLeaf(p, getRoot());
|
|
||||||
}
|
|
||||||
|
|
||||||
- const TileT* intersectLeaf(const typename TileT::VectorType& p, const typename TileT& tile) const
|
|
||||||
+ const TileT* intersectLeaf(const typename TileT::VectorType& p, const TileT& tile) const
|
|
||||||
{
|
|
||||||
if (tile.bounds.intersects(p))
|
|
||||||
{
|
|
||||||
@@ -201,12 +201,12 @@ struct QuadTree
|
|
||||||
int y = tile.key.y * 2;
|
|
||||||
int level = tile.key.level + 1;
|
|
||||||
|
|
||||||
- TileT::VectorType size = tile.bounds.size() / 2;
|
|
||||||
- TileT::VectorType center = tile.bounds.minimum + size;
|
|
||||||
- TileT::VectorType centerE(tile.bounds.maximum.x(), center.y());
|
|
||||||
- TileT::VectorType centerW(tile.bounds.minimum.x(), center.y());
|
|
||||||
- TileT::VectorType centerN(center.x(), tile.bounds.maximum.y());
|
|
||||||
- TileT::VectorType centerS(center.x(), tile.bounds.minimum.y());
|
|
||||||
+ typename TileT::VectorType size = tile.bounds.size() / 2;
|
|
||||||
+ typename TileT::VectorType center = tile.bounds.minimum + size;
|
|
||||||
+ typename TileT::VectorType centerE(tile.bounds.maximum.x(), center.y());
|
|
||||||
+ typename TileT::VectorType centerW(tile.bounds.minimum.x(), center.y());
|
|
||||||
+ typename TileT::VectorType centerN(center.x(), tile.bounds.maximum.y());
|
|
||||||
+ typename TileT::VectorType centerS(center.x(), tile.bounds.minimum.y());
|
|
||||||
|
|
||||||
tile.children[0] = mTileCreator(QuadTreeTileKey(level, x, y), Box2T<typename TileT::VectorType>(centerW, centerN)); // north west
|
|
||||||
tile.children[1] = mTileCreator(QuadTreeTileKey(level, x + 1, y), Box2T<typename TileT::VectorType>(center, tile.bounds.maximum)); // north east
|
|
||||||
@@ -242,7 +242,7 @@ private:
|
|
||||||
template <typename TileT>
|
|
||||||
struct DiQuadTree
|
|
||||||
{
|
|
||||||
- typedef typename TileT TileType;
|
|
||||||
+ typedef TileT TileType;
|
|
||||||
|
|
||||||
QuadTree<TileT> leftTree;
|
|
||||||
QuadTree<TileT> rightTree;
|
|
||||||
@@ -269,8 +269,8 @@ struct DiQuadTree
|
|
||||||
template <class TileT>
|
|
||||||
DiQuadTree<TileT> createGlobeQuadTree(typename QuadTree<TileT>::TileCreator tileCreator)
|
|
||||||
{
|
|
||||||
- static const Box2T<TileT::VectorType> leftBounds(TileT::VectorType(-skybolt::math::piD(), -skybolt::math::halfPiD()), TileT::VectorType(0, skybolt::math::halfPiD()));
|
|
||||||
- static const Box2T<TileT::VectorType> rightBounds(TileT::VectorType(0, -skybolt::math::halfPiD()), TileT::VectorType(skybolt::math::piD(), skybolt::math::halfPiD()));
|
|
||||||
+ static const Box2T<typename TileT::VectorType> leftBounds(typename TileT::VectorType(-skybolt::math::piD(), -skybolt::math::halfPiD()), typename TileT::VectorType(0, skybolt::math::halfPiD()));
|
|
||||||
+ static const Box2T<typename TileT::VectorType> rightBounds(typename TileT::VectorType(0, -skybolt::math::halfPiD()), typename TileT::VectorType(skybolt::math::piD(), skybolt::math::halfPiD()));
|
|
||||||
|
|
||||||
return DiQuadTree<TileT>(tileCreator, QuadTreeTileKey(0, 0, 0), leftBounds, QuadTreeTileKey(0, 1, 0), rightBounds);
|
|
||||||
}
|
|
||||||
@@ -286,7 +286,7 @@ public:
|
|
||||||
const typename TreeT::TileType* intersect(const typename TreeT::TileType::VectorType& p)
|
|
||||||
{
|
|
||||||
return tree->intersect(p, predicate);
|
|
||||||
- typename const TreeT::TileType* tile = getLastTile();
|
|
||||||
+ typename TreeT::TileType* tile = getLastTile();
|
|
||||||
if (tile && tile->bounds.intersects(p))
|
|
||||||
{
|
|
||||||
return tile;
|
|
||||||
@@ -304,7 +304,7 @@ public:
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
- typename const TreeT::TileType* getLastTile()
|
|
||||||
+ typename TreeT::TileType* getLastTile()
|
|
||||||
{
|
|
||||||
std::shared_lock<std::shared_mutex> lock(lastTileMutex);
|
|
||||||
auto i = lastTileMap.find(std::this_thread::get_id());
|
|
||||||
@@ -315,7 +315,7 @@ private:
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
- void setLastTile(typename const TreeT::TileType* tile)
|
|
||||||
+ void setLastTile(typename TreeT::TileType* tile)
|
|
||||||
{
|
|
||||||
std::unique_lock<std::shared_mutex> lock(lastTileMutex);
|
|
||||||
lastTileMap[std::this_thread::get_id()] = tile;
|
|
||||||
@@ -325,7 +325,7 @@ private:
|
|
||||||
const std::shared_ptr<TreeT> tree;
|
|
||||||
typename QuadTree<typename TreeT::TileType>::IntersectionPredicate predicate;
|
|
||||||
|
|
||||||
- std::map<std::thread::id, typename const TreeT::TileType*> lastTileMap;
|
|
||||||
+ std::map<std::thread::id, typename TreeT::TileType*> lastTileMap;
|
|
||||||
std::shared_mutex lastTileMutex;
|
|
||||||
};
|
|
||||||
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,124 +0,0 @@
|
|||||||
From bc77f7582bd1de4f9b047d5e78ac509ea0de67a1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 07/23] squelch warnings about '#pragma once' use in cpp files
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltCommon/Math/QuadTree.cpp | 2 --
|
|
||||||
src/Skybolt/SkyboltEngine/ComponentFactory.cpp | 2 --
|
|
||||||
src/Skybolt/SkyboltSim/System/EntitySystem.cpp | 2 --
|
|
||||||
.../SkyboltVis/RenderTarget/RenderTargetSceneAdapter.cpp | 3 ---
|
|
||||||
.../Renderable/Planet/Tile/PlanetSubdivisionPredicate.cpp | 2 --
|
|
||||||
.../Renderable/Planet/Tile/TileSource/CachedTileSource.cpp | 2 --
|
|
||||||
src/Skybolt/SkyboltVis/ShadowHelpers.cpp | 2 --
|
|
||||||
src/Skybolt/SkyboltVisTests/Helpers/CaptureTexture.cpp | 2 --
|
|
||||||
8 files changed, 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltCommon/Math/QuadTree.cpp b/src/Skybolt/SkyboltCommon/Math/QuadTree.cpp
|
|
||||||
index 3127e63..9e3b8ba 100644
|
|
||||||
--- a/src/Skybolt/SkyboltCommon/Math/QuadTree.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltCommon/Math/QuadTree.cpp
|
|
||||||
@@ -4,8 +4,6 @@
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
-#pragma once
|
|
||||||
-
|
|
||||||
#include "QuadTree.h"
|
|
||||||
|
|
||||||
namespace skybolt {
|
|
||||||
diff --git a/src/Skybolt/SkyboltEngine/ComponentFactory.cpp b/src/Skybolt/SkyboltEngine/ComponentFactory.cpp
|
|
||||||
index fabb071..0e8e005 100644
|
|
||||||
--- a/src/Skybolt/SkyboltEngine/ComponentFactory.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltEngine/ComponentFactory.cpp
|
|
||||||
@@ -4,8 +4,6 @@
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
-#pragma once
|
|
||||||
-
|
|
||||||
#include "ComponentFactory.h"
|
|
||||||
|
|
||||||
#include <SkyboltSim/CollisionGroupMasks.h>
|
|
||||||
diff --git a/src/Skybolt/SkyboltSim/System/EntitySystem.cpp b/src/Skybolt/SkyboltSim/System/EntitySystem.cpp
|
|
||||||
index 02986aa..962e63a 100644
|
|
||||||
--- a/src/Skybolt/SkyboltSim/System/EntitySystem.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltSim/System/EntitySystem.cpp
|
|
||||||
@@ -4,8 +4,6 @@
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
-#pragma once
|
|
||||||
-
|
|
||||||
#include "EntitySystem.h"
|
|
||||||
#include "SkyboltSim/Entity.h"
|
|
||||||
#include "SkyboltSim/World.h"
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/RenderTarget/RenderTargetSceneAdapter.cpp b/src/Skybolt/SkyboltVis/RenderTarget/RenderTargetSceneAdapter.cpp
|
|
||||||
index 79eb94d..c01f5eb 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/RenderTarget/RenderTargetSceneAdapter.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/RenderTarget/RenderTargetSceneAdapter.cpp
|
|
||||||
@@ -4,9 +4,6 @@
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
-
|
|
||||||
-#pragma once
|
|
||||||
-
|
|
||||||
#include "RenderTargetSceneAdapter.h"
|
|
||||||
#include "SkyboltVis/Camera.h"
|
|
||||||
#include "SkyboltVis/Scene.h"
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/Renderable/Planet/Tile/PlanetSubdivisionPredicate.cpp b/src/Skybolt/SkyboltVis/Renderable/Planet/Tile/PlanetSubdivisionPredicate.cpp
|
|
||||||
index 0a2a5d2..7dd9319 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/Renderable/Planet/Tile/PlanetSubdivisionPredicate.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/Renderable/Planet/Tile/PlanetSubdivisionPredicate.cpp
|
|
||||||
@@ -4,8 +4,6 @@
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
-#pragma once
|
|
||||||
-
|
|
||||||
#include "PlanetSubdivisionPredicate.h"
|
|
||||||
#include "SkyboltVis/OsgGeocentric.h"
|
|
||||||
#include "SkyboltVis/OsgMathHelpers.h"
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/Renderable/Planet/Tile/TileSource/CachedTileSource.cpp b/src/Skybolt/SkyboltVis/Renderable/Planet/Tile/TileSource/CachedTileSource.cpp
|
|
||||||
index 81450a8..3354396 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/Renderable/Planet/Tile/TileSource/CachedTileSource.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/Renderable/Planet/Tile/TileSource/CachedTileSource.cpp
|
|
||||||
@@ -4,8 +4,6 @@
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
-#pragma once
|
|
||||||
-
|
|
||||||
#include "CachedTileSource.h"
|
|
||||||
#include "SkyboltVis/OsgImageHelpers.h"
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/ShadowHelpers.cpp b/src/Skybolt/SkyboltVis/ShadowHelpers.cpp
|
|
||||||
index d2ea517..52468a4 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/ShadowHelpers.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/ShadowHelpers.cpp
|
|
||||||
@@ -4,8 +4,6 @@
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
-#pragma once
|
|
||||||
-
|
|
||||||
#include "ShadowHelpers.h"
|
|
||||||
#include "OsgStateSetHelpers.h"
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltVisTests/Helpers/CaptureTexture.cpp b/src/Skybolt/SkyboltVisTests/Helpers/CaptureTexture.cpp
|
|
||||||
index 92b4170..d1444ce 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVisTests/Helpers/CaptureTexture.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVisTests/Helpers/CaptureTexture.cpp
|
|
||||||
@@ -4,8 +4,6 @@
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
-#pragma once
|
|
||||||
-
|
|
||||||
#include "CaptureTexture.h"
|
|
||||||
#include <osg/Texture3D>
|
|
||||||
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From 8aca3be81a423e829afbfdaa0da4f62133549f69 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 08/23] NumericComparison: Math.h not found or required
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltCommon/NumericComparison.h | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltCommon/NumericComparison.h b/src/Skybolt/SkyboltCommon/NumericComparison.h
|
|
||||||
index f1ed64e..11f80ea 100644
|
|
||||||
--- a/src/Skybolt/SkyboltCommon/NumericComparison.h
|
|
||||||
+++ b/src/Skybolt/SkyboltCommon/NumericComparison.h
|
|
||||||
@@ -6,7 +6,6 @@
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
-#include "Math.h"
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <complex>
|
|
||||||
#include <string>
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From 65dab98d86a268e8c4e536d60c04086730230bcc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 09/23] EngineStats: stdlib provides size_t
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltEngine/EngineStats.h | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltEngine/EngineStats.h b/src/Skybolt/SkyboltEngine/EngineStats.h
|
|
||||||
index 6f05e5a..187a69b 100644
|
|
||||||
--- a/src/Skybolt/SkyboltEngine/EngineStats.h
|
|
||||||
+++ b/src/Skybolt/SkyboltEngine/EngineStats.h
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
+#include <stdlib.h> //size_t
|
|
||||||
|
|
||||||
namespace skybolt {
|
|
||||||
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,99 +0,0 @@
|
|||||||
From 6a07af9e468143f48b1141525bdfcd7e0842a911 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 10/23] remove assert() statements that reference non-existant
|
|
||||||
variables
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltEngine/EntityFactory.cpp | 2 --
|
|
||||||
.../Sequence/JulianDateSequenceController.cpp | 1 -
|
|
||||||
.../SkyboltSim/CameraController/CameraController.cpp | 2 +-
|
|
||||||
src/Skybolt/SkyboltVis/RenderTarget/Viewport.cpp | 2 --
|
|
||||||
.../Renderable/Planet/Features/PlanetFeatures.cpp | 1 -
|
|
||||||
.../SkyboltVis/Renderable/Planet/Tile/OsgTileFactory.cpp | 8 --------
|
|
||||||
6 files changed, 1 insertion(+), 15 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltEngine/EntityFactory.cpp b/src/Skybolt/SkyboltEngine/EntityFactory.cpp
|
|
||||||
index 65c6113..53fbe22 100644
|
|
||||||
--- a/src/Skybolt/SkyboltEngine/EntityFactory.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltEngine/EntityFactory.cpp
|
|
||||||
@@ -465,8 +465,6 @@ EntityFactory::EntityFactory(const EntityFactory::Context& context, const std::v
|
|
||||||
assert(context.simWorld);
|
|
||||||
assert(context.stats);
|
|
||||||
assert(context.tileSourceFactory);
|
|
||||||
- assert(context.Scene);
|
|
||||||
- assert(context.visWindow);
|
|
||||||
|
|
||||||
mBuiltinTemplates = {
|
|
||||||
{"SunBillboard", [this] {return createSun(); }},
|
|
||||||
diff --git a/src/Skybolt/SkyboltEngine/Sequence/JulianDateSequenceController.cpp b/src/Skybolt/SkyboltEngine/Sequence/JulianDateSequenceController.cpp
|
|
||||||
index 7abfba2..069c0ff 100644
|
|
||||||
--- a/src/Skybolt/SkyboltEngine/Sequence/JulianDateSequenceController.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltEngine/Sequence/JulianDateSequenceController.cpp
|
|
||||||
@@ -16,7 +16,6 @@ JulianDateSequenceController::JulianDateSequenceController(const std::shared_ptr
|
|
||||||
StateSequenceControllerT(sequence),
|
|
||||||
mScenario(scenario)
|
|
||||||
{
|
|
||||||
- assert(mEntity);
|
|
||||||
mInterpolator = std::make_unique<LinearInterpolatorD>(
|
|
||||||
[this] (int i) { return mSequence->values[i].value; });
|
|
||||||
}
|
|
||||||
diff --git a/src/Skybolt/SkyboltSim/CameraController/CameraController.cpp b/src/Skybolt/SkyboltSim/CameraController/CameraController.cpp
|
|
||||||
index a73df97..3f29ac7 100644
|
|
||||||
--- a/src/Skybolt/SkyboltSim/CameraController/CameraController.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltSim/CameraController/CameraController.cpp
|
|
||||||
@@ -48,6 +48,6 @@ void CameraController::setTarget(Entity* entity)
|
|
||||||
|
|
||||||
void CameraController::onDestroy(Entity* entity)
|
|
||||||
{
|
|
||||||
- assert(object == mTarget);
|
|
||||||
+ assert(entity == mTarget);
|
|
||||||
setTarget(nullptr);
|
|
||||||
}
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/RenderTarget/Viewport.cpp b/src/Skybolt/SkyboltVis/RenderTarget/Viewport.cpp
|
|
||||||
index f0b5b65..3240d23 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/RenderTarget/Viewport.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/RenderTarget/Viewport.cpp
|
|
||||||
@@ -14,8 +14,6 @@ using namespace skybolt::vis;
|
|
||||||
Viewport::Viewport() :
|
|
||||||
RenderTarget(new osg::Camera)
|
|
||||||
{
|
|
||||||
- assert(mWindow);
|
|
||||||
-
|
|
||||||
mOsgCamera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
|
|
||||||
mOsgCamera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
|
|
||||||
mOsgCamera->setClearColor(osg::Vec4(0, 0, 0, 0));
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/Renderable/Planet/Features/PlanetFeatures.cpp b/src/Skybolt/SkyboltVis/Renderable/Planet/Features/PlanetFeatures.cpp
|
|
||||||
index 273cfeb..f580155 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/Renderable/Planet/Features/PlanetFeatures.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/Renderable/Planet/Features/PlanetFeatures.cpp
|
|
||||||
@@ -210,7 +210,6 @@ PlanetFeatures::PlanetFeatures(const PlanetFeaturesParams& params) :
|
|
||||||
mPlanetRadius(params.planetRadius),
|
|
||||||
mFeatures(createTile)
|
|
||||||
{
|
|
||||||
- assert(mLatLonElevationProvider);
|
|
||||||
assert(mScheduler);
|
|
||||||
|
|
||||||
for (int i = 0; i < PlanetFeaturesParams::featureGroupsSize; ++i)
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/Renderable/Planet/Tile/OsgTileFactory.cpp b/src/Skybolt/SkyboltVis/Renderable/Planet/Tile/OsgTileFactory.cpp
|
|
||||||
index 4b1daea..2d676f5 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/Renderable/Planet/Tile/OsgTileFactory.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/Renderable/Planet/Tile/OsgTileFactory.cpp
|
|
||||||
@@ -45,14 +45,6 @@ OsgTileFactory::OsgTileFactory(const OsgTileFactoryConfig& config) :
|
|
||||||
mForestGeoVisibilityRange(config.forestGeoVisibilityRange),
|
|
||||||
mHasCloudShadows(config.hasCloudShadows)
|
|
||||||
{
|
|
||||||
- assert(scheduler);
|
|
||||||
- assert(programs);
|
|
||||||
-
|
|
||||||
- // FIXME: textureCompiler is currently unused, remove.
|
|
||||||
- // It was originally used to pre-compile textures before used by the renderer,
|
|
||||||
- // but it was found to be unnecessary because we throttle the amount of terrain tiles
|
|
||||||
- // created each frame which limits the amount of texture compilation requred.
|
|
||||||
- assert(textureCompiler);
|
|
||||||
}
|
|
||||||
|
|
||||||
OsgTile OsgTileFactory::createOsgTile(const QuadTreeTileKey& key, const Box2d& latLonBounds, const TileImage& heightImage, osg::Image* landMaskImage,
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From 50407396fb6aeec1fbd95be4e6486819cafbd8d7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 11/23] boost/function.hpp provides std::function
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltEngine/Plugin/PluginHelpers.h | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltEngine/Plugin/PluginHelpers.h b/src/Skybolt/SkyboltEngine/Plugin/PluginHelpers.h
|
|
||||||
index 99b6aa5..966f094 100644
|
|
||||||
--- a/src/Skybolt/SkyboltEngine/Plugin/PluginHelpers.h
|
|
||||||
+++ b/src/Skybolt/SkyboltEngine/Plugin/PluginHelpers.h
|
|
||||||
@@ -10,6 +10,7 @@
|
|
||||||
#include <boost/dll/import.hpp>
|
|
||||||
#include <boost/filesystem.hpp>
|
|
||||||
#include <boost/log/trivial.hpp>
|
|
||||||
+#include <boost/function.hpp>
|
|
||||||
|
|
||||||
namespace skybolt {
|
|
||||||
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 7481ff6c5890b54dfae4229fa80fd6c5f2433fe3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 12/23] VisOrbits: const auto required here (g++ 8.3.0)
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltEngine/SimVisBinding/VisOrbits.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltEngine/SimVisBinding/VisOrbits.cpp b/src/Skybolt/SkyboltEngine/SimVisBinding/VisOrbits.cpp
|
|
||||||
index 4fbd299..e32b412 100644
|
|
||||||
--- a/src/Skybolt/SkyboltEngine/SimVisBinding/VisOrbits.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltEngine/SimVisBinding/VisOrbits.cpp
|
|
||||||
@@ -35,7 +35,7 @@ VisOrbits::~VisOrbits()
|
|
||||||
|
|
||||||
static boost::optional<Orbit> getOrbit(const Entity& entity, double julianDate)
|
|
||||||
{
|
|
||||||
- if (auto& controller = entity.getFirstComponent<OrbitComponent>())
|
|
||||||
+ if (const auto& controller = entity.getFirstComponent<OrbitComponent>())
|
|
||||||
{
|
|
||||||
return controller->orbit;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
From 3849eb0574485208c23945b1d57981fdf72e00ac Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 13/23] AttachmentPointsComponent: return something on
|
|
||||||
getOrientation() error
|
|
||||||
|
|
||||||
---
|
|
||||||
.../SkyboltSim/Components/AttachmentPointsComponent.cpp | 6 +++++-
|
|
||||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltSim/Components/AttachmentPointsComponent.cpp b/src/Skybolt/SkyboltSim/Components/AttachmentPointsComponent.cpp
|
|
||||||
index b5a1189..8e5fc1e 100644
|
|
||||||
--- a/src/Skybolt/SkyboltSim/Components/AttachmentPointsComponent.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltSim/Components/AttachmentPointsComponent.cpp
|
|
||||||
@@ -47,7 +47,11 @@ Quaternion calcAttachmentPointOrientation(const Entity& entity, const Attachment
|
|
||||||
{
|
|
||||||
return *orientation * point.orientationRelBody;
|
|
||||||
}
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ return Quaternion(); //FIXME: or return error level?
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace sim
|
|
||||||
-} // namespace skybolt
|
|
||||||
\ No newline at end of file
|
|
||||||
+} // namespace skybolt
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From 6795a33d1107245b224f1ea142ffead9544e5759 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 14/23] Astronomy: make calcHourAngle prototype static
|
|
||||||
|
|
||||||
make it consistent with implementation
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltSim/Physics/Astronomy.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltSim/Physics/Astronomy.h b/src/Skybolt/SkyboltSim/Physics/Astronomy.h
|
|
||||||
index 1412823..b34f58d 100644
|
|
||||||
--- a/src/Skybolt/SkyboltSim/Physics/Astronomy.h
|
|
||||||
+++ b/src/Skybolt/SkyboltSim/Physics/Astronomy.h
|
|
||||||
@@ -26,7 +26,7 @@ double calcEarthAxialTilt(double julianDate);
|
|
||||||
|
|
||||||
LatLon convertEclipticToEquatorial(double julianDate, const LatLon& ecliptic);
|
|
||||||
|
|
||||||
-double calcHourAngle(double julianDate, const LatLon& equatorial, const LatLon& observer);
|
|
||||||
+static double calcHourAngle(double julianDate, const LatLon& equatorial, const LatLon& observer);
|
|
||||||
|
|
||||||
AzEl convertEquatorialToHorizontal(double julianDate, const LatLon& equatorial, const LatLon& observer);
|
|
||||||
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From ba5bab15f77ea16050976b911dc3217589289230 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 15/23] BruentonAtmosphereGenerator: make
|
|
||||||
getOptionalSingleMieScatteringTexture() return intended value
|
|
||||||
|
|
||||||
---
|
|
||||||
.../Atmosphere/Bruneton/BruentonAtmosphereGenerator.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/Renderable/Atmosphere/Bruneton/BruentonAtmosphereGenerator.h b/src/Skybolt/SkyboltVis/Renderable/Atmosphere/Bruneton/BruentonAtmosphereGenerator.h
|
|
||||||
index 2663387..ac3507e 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/Renderable/Atmosphere/Bruneton/BruentonAtmosphereGenerator.h
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/Renderable/Atmosphere/Bruneton/BruentonAtmosphereGenerator.h
|
|
||||||
@@ -54,7 +54,7 @@ public:
|
|
||||||
const osg::ref_ptr<osg::Texture>& getTransmittanceTexture() const { return mTransmittanceTexture; }
|
|
||||||
const osg::ref_ptr<osg::Texture>& getScatteringTexture() const { return mScatteringTexture; }
|
|
||||||
const osg::ref_ptr<osg::Texture>& getIrradianceTexture() const { return mIrradianceTexture; }
|
|
||||||
- const osg::ref_ptr<osg::Texture>& getOptionalSingleMieScatteringTexture() const { mOptionalSingleMieScatteringTexture; }
|
|
||||||
+ const osg::ref_ptr<osg::Texture>& getOptionalSingleMieScatteringTexture() const { return mOptionalSingleMieScatteringTexture; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
std::unique_ptr<class CompositingPipelineFactory> mCompositingPipelineFactory;
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
From 48071f258e546d8ba90df6442711f7514bdd67a5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 16/23] ceilf and floorf are valid c99 functions, and do not
|
|
||||||
require c++ std:: namespace
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltVis/Renderable/BuildingsBatch.cpp | 2 +-
|
|
||||||
src/Skybolt/SkyboltVis/Renderable/Water/WaterStateSet.cpp | 4 ++--
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/Renderable/BuildingsBatch.cpp b/src/Skybolt/SkyboltVis/Renderable/BuildingsBatch.cpp
|
|
||||||
index 388c392..1723da5 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/Renderable/BuildingsBatch.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/Renderable/BuildingsBatch.cpp
|
|
||||||
@@ -100,7 +100,7 @@ static void createBuilding(const Building& building, const FacadeTexture& facade
|
|
||||||
}
|
|
||||||
|
|
||||||
// UVs
|
|
||||||
- int levels = std::ceilf(building.height / buildingLevelHeight);
|
|
||||||
+ int levels = ceilf(building.height / buildingLevelHeight);
|
|
||||||
|
|
||||||
// calculate vertical repeats so that texture is not cut off vertically mid level within the texture
|
|
||||||
float textureWorldHeight = facade.buildingLevelsInTexture * buildingLevelHeight;
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/Renderable/Water/WaterStateSet.cpp b/src/Skybolt/SkyboltVis/Renderable/Water/WaterStateSet.cpp
|
|
||||||
index 71ee9c8..6f18fdc 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/Renderable/Water/WaterStateSet.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/Renderable/Water/WaterStateSet.cpp
|
|
||||||
@@ -120,8 +120,8 @@ static osg::Vec2i calcHashCellCoord(const osg::Vec2f& point)
|
|
||||||
osg::Vec2i index;
|
|
||||||
osg::Vec2f indexF = componentWiseDivide(point, hasCellWorldSize);
|
|
||||||
return osg::Vec2i(
|
|
||||||
- int(std::floorf(indexF.x())),
|
|
||||||
- int(std::floorf(indexF.y())));
|
|
||||||
+ int(floorf(indexF.x())),
|
|
||||||
+ int(floorf(indexF.y())));
|
|
||||||
}
|
|
||||||
|
|
||||||
int modPositive(int a, int b)
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
From 8edd22d1bcf5f8d79cc4e483a0cd6414cd212a98 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 17/23] ExamplesCommon: add CMAKE_DL_LIBS to target
|
|
||||||
|
|
||||||
---
|
|
||||||
src/SkyboltExamples/ExamplesCommon/CMakeLists.txt | 2 +-
|
|
||||||
src/SkyboltExamples/MinimalApp/CMakeLists.txt | 2 +-
|
|
||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/SkyboltExamples/ExamplesCommon/CMakeLists.txt b/src/SkyboltExamples/ExamplesCommon/CMakeLists.txt
|
|
||||||
index e2bd94d..8a7eef1 100644
|
|
||||||
--- a/src/SkyboltExamples/ExamplesCommon/CMakeLists.txt
|
|
||||||
+++ b/src/SkyboltExamples/ExamplesCommon/CMakeLists.txt
|
|
||||||
@@ -15,4 +15,4 @@ add_library(${LIB_NAME} STATIC ${SOURCE_FILES} ${HEADER_FILES})
|
|
||||||
|
|
||||||
set_target_properties(${LIB_NAME} PROPERTIES FOLDER Examples)
|
|
||||||
|
|
||||||
-target_link_libraries(${LIB_NAME} ${LIBRARIES})
|
|
||||||
+target_link_libraries(${LIB_NAME} ${LIBRARIES} ${CMAKE_DL_LIBS})
|
|
||||||
diff --git a/src/SkyboltExamples/MinimalApp/CMakeLists.txt b/src/SkyboltExamples/MinimalApp/CMakeLists.txt
|
|
||||||
index 1e959f0..1f5f3ec 100644
|
|
||||||
--- a/src/SkyboltExamples/MinimalApp/CMakeLists.txt
|
|
||||||
+++ b/src/SkyboltExamples/MinimalApp/CMakeLists.txt
|
|
||||||
@@ -11,7 +11,7 @@ ExamplesCommon
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(${APP_NAME} ${SOURCE})
|
|
||||||
-target_link_libraries (${APP_NAME} ${LIBS})
|
|
||||||
+target_link_libraries (${APP_NAME} ${LIBS})
|
|
||||||
|
|
||||||
set_target_properties(${APP_NAME} PROPERTIES FOLDER Examples)
|
|
||||||
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From 2b45d567b05ff5588a7a1625582c5260bbfd67ae Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 18/23] BillboardForest:
|
|
||||||
s/setMipmapMaxLevel/setNumMipmapLevels/ (OSG 3.7.0)
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltVis/Renderable/Forest/BillboardForest.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/Renderable/Forest/BillboardForest.cpp b/src/Skybolt/SkyboltVis/Renderable/Forest/BillboardForest.cpp
|
|
||||||
index 553fa9c..7b2e193 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/Renderable/Forest/BillboardForest.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/Renderable/Forest/BillboardForest.cpp
|
|
||||||
@@ -124,7 +124,7 @@ void BillboardForest::addGeodes(osg::Group& node, const std::vector<Tree>& trees
|
|
||||||
ss->setAttributeAndModes(topProgram, osg::StateAttribute::ON);
|
|
||||||
static osg::ref_ptr<osg::Texture2D> albedoTexture = new osg::Texture2D(readImageWithCorrectOrientation("Environment/Forest/spruceAtlas_top_albedo.tga"));
|
|
||||||
albedoTexture->setInternalFormat(toSrgbInternalFormat(albedoTexture->getInternalFormat()));
|
|
||||||
- albedoTexture->setMipmapMaxLevel(4); // TODO: Modify highest mipmap levels so that they maintain alpha, tghen remove this max level
|
|
||||||
+ albedoTexture->setNumMipmapLevels(4); // TODO: Modify highest mipmap levels so that they maintain alpha, tghen remove this max level
|
|
||||||
ss->setTextureAttributeAndModes(0, albedoTexture, osg::StateAttribute::ON);
|
|
||||||
|
|
||||||
topGeode->setStateSet(ss);
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 8b3a6f6d9eadf4e1597619a1480aeee94430329f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 19/23] Planet.h: class MyPlanetSurfaceListener required
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltVis/Renderable/Planet/Planet.h | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/Renderable/Planet/Planet.h b/src/Skybolt/SkyboltVis/Renderable/Planet/Planet.h
|
|
||||||
index 544d2c8..bed5f8a 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/Renderable/Planet/Planet.h
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/Renderable/Planet/Planet.h
|
|
||||||
@@ -44,6 +44,8 @@ struct PlanetConfig
|
|
||||||
boost::optional<file::Path> featuresDirectory;
|
|
||||||
};
|
|
||||||
|
|
||||||
+class MyPlanetSurfaceListener;
|
|
||||||
+
|
|
||||||
class Planet : public RootNode
|
|
||||||
{
|
|
||||||
friend class MyPlanetSurfaceListener;
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
From e4b123b67f88cf56563d73eb51f28fe1281a6529 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 20/23] StandaloneWindow: add X11 abstraction
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltVis/Window/StandaloneWindow.cpp | 8 ++++++++
|
|
||||||
1 file changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltVis/Window/StandaloneWindow.cpp b/src/Skybolt/SkyboltVis/Window/StandaloneWindow.cpp
|
|
||||||
index 60cae7d..cb582d5 100644
|
|
||||||
--- a/src/Skybolt/SkyboltVis/Window/StandaloneWindow.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltVis/Window/StandaloneWindow.cpp
|
|
||||||
@@ -6,7 +6,11 @@
|
|
||||||
|
|
||||||
#include "StandaloneWindow.h"
|
|
||||||
#include <osgViewer/ViewerEventHandlers>
|
|
||||||
+#if defined(WIN32)
|
|
||||||
#include <osgViewer/api/Win32/GraphicsHandleWin32>
|
|
||||||
+#else
|
|
||||||
+#include <osgViewer/api/X11/GraphicsHandleX11>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
using namespace skybolt::vis;
|
|
||||||
|
|
||||||
@@ -60,7 +64,11 @@ std::string StandaloneWindow::getHandle() const
|
|
||||||
mViewer->getWindows(windows);
|
|
||||||
if (windows.empty())
|
|
||||||
return "";
|
|
||||||
+#if defined(WIN32)
|
|
||||||
// TODO: Don't depend on Win32
|
|
||||||
size_t ptr = (size_t)dynamic_cast<osgViewer::GraphicsHandleWin32*>(windows[0])->getHWND();
|
|
||||||
+#else
|
|
||||||
+ size_t ptr = (size_t)dynamic_cast<osgViewer::GraphicsHandleX11*>(windows[0])->getDisplay();
|
|
||||||
+#endif
|
|
||||||
return std::to_string(ptr);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 36074c4c7e37673baa9d96a8a3bc31da0d802d82 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 21/23] TileMapGenerator: don't propagate void return type
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/TileMapGenerator/main.cpp | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/TileMapGenerator/main.cpp b/src/Skybolt/TileMapGenerator/main.cpp
|
|
||||||
index 462dcf5..1bd76dd 100644
|
|
||||||
--- a/src/Skybolt/TileMapGenerator/main.cpp
|
|
||||||
+++ b/src/Skybolt/TileMapGenerator/main.cpp
|
|
||||||
@@ -139,5 +139,5 @@ void main_dem()
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
- return main_dem();
|
|
||||||
-}
|
|
||||||
\ No newline at end of file
|
|
||||||
+ main_dem();
|
|
||||||
+}
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 514a7dd707c2670bfb18c210446775c4040539db Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 22/23] ShaUtility: fix path for sha1 algorithm
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltCommon/ShaUtility.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltCommon/ShaUtility.cpp b/src/Skybolt/SkyboltCommon/ShaUtility.cpp
|
|
||||||
index 153af9f..950e943 100644
|
|
||||||
--- a/src/Skybolt/SkyboltCommon/ShaUtility.cpp
|
|
||||||
+++ b/src/Skybolt/SkyboltCommon/ShaUtility.cpp
|
|
||||||
@@ -6,7 +6,7 @@
|
|
||||||
|
|
||||||
#include "ShaUtility.h"
|
|
||||||
|
|
||||||
-#include <boost/uuid/sha1.hpp>
|
|
||||||
+#include <boost/uuid/detail/sha1.hpp>
|
|
||||||
|
|
||||||
namespace skybolt {
|
|
||||||
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From de0a418682efc72154cfee94d5f076cbb4fbb23d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Ross <pross@xvid.org>
|
|
||||||
Date: Wed, 16 Dec 2020 15:15:40 +1100
|
|
||||||
Subject: [PATCH 23/23] QuadTree: remove unused, and broken, code path (g++
|
|
||||||
8.3.0)
|
|
||||||
|
|
||||||
---
|
|
||||||
src/Skybolt/SkyboltCommon/Math/QuadTree.h | 8 --------
|
|
||||||
1 file changed, 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/Skybolt/SkyboltCommon/Math/QuadTree.h b/src/Skybolt/SkyboltCommon/Math/QuadTree.h
|
|
||||||
index d5a06e1..2dfe8b9 100644
|
|
||||||
--- a/src/Skybolt/SkyboltCommon/Math/QuadTree.h
|
|
||||||
+++ b/src/Skybolt/SkyboltCommon/Math/QuadTree.h
|
|
||||||
@@ -286,14 +286,6 @@ public:
|
|
||||||
const typename TreeT::TileType* intersect(const typename TreeT::TileType::VectorType& p)
|
|
||||||
{
|
|
||||||
return tree->intersect(p, predicate);
|
|
||||||
- typename TreeT::TileType* tile = getLastTile();
|
|
||||||
- if (tile && tile->bounds.intersects(p))
|
|
||||||
- {
|
|
||||||
- return tile;
|
|
||||||
- }
|
|
||||||
- tile = tree->intersect(p, predicate);
|
|
||||||
- setLastTile(tile);
|
|
||||||
- return tile;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! @ThreadSafe
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
32
patches/skybolt/0001-Findcigicl-fix-linux-library-name.patch
Normal file
32
patches/skybolt/0001-Findcigicl-fix-linux-library-name.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 722c0ffc605d4c7dc0f998954f5613e24c620268 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Ross <pross@xvid.org>
|
||||||
|
Date: Sun, 20 Dec 2020 20:00:36 +1100
|
||||||
|
Subject: [PATCH 1/5] Findcigicl: fix linux library name
|
||||||
|
|
||||||
|
---
|
||||||
|
CMake/Modules/Findcigicl.cmake | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMake/Modules/Findcigicl.cmake b/CMake/Modules/Findcigicl.cmake
|
||||||
|
index 7ae6dbd..21fc139 100644
|
||||||
|
--- a/CMake/Modules/Findcigicl.cmake
|
||||||
|
+++ b/CMake/Modules/Findcigicl.cmake
|
||||||
|
@@ -9,13 +9,13 @@ FIND_PATH(cigicl_INCLUDE_DIR cigicl/CigiTypes.h
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(cigicl_LIB_R
|
||||||
|
- NAMES ccl_dll
|
||||||
|
+ NAMES ccl_dll cigicl
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(cigicl_LIB_D
|
||||||
|
- NAMES ccl_dllD
|
||||||
|
+ NAMES ccl_dllD cigicl
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib
|
||||||
|
)
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
From cdb967eb2374d4c73233974e5d03b4d46f9dac24 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Ross <pross@xvid.org>
|
||||||
|
Date: Sun, 20 Dec 2020 20:00:36 +1100
|
||||||
|
Subject: [PATCH 2/5] FindToolWindowManager.cmake: LIB_D fix
|
||||||
|
|
||||||
|
---
|
||||||
|
CMake/Modules/FindToolWindowManager.cmake | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/CMake/Modules/FindToolWindowManager.cmake b/CMake/Modules/FindToolWindowManager.cmake
|
||||||
|
index 371791b..993b3df 100644
|
||||||
|
--- a/CMake/Modules/FindToolWindowManager.cmake
|
||||||
|
+++ b/CMake/Modules/FindToolWindowManager.cmake
|
||||||
|
@@ -15,7 +15,7 @@ FIND_LIBRARY(ToolWindowManager_LIB_R
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(ToolWindowManager_LIB_D
|
||||||
|
- NAMES qtoolwindowmanagerd
|
||||||
|
+ NAMES qtoolwindowmanagerd qtoolwindowmanager
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib
|
||||||
|
)
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
@ -0,0 +1,68 @@
|
|||||||
|
From 3b2c5b57f9e22e4293de42e519ee7d5b3ef1bd61 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Ross <pross@xvid.org>
|
||||||
|
Date: Sun, 20 Dec 2020 20:00:36 +1100
|
||||||
|
Subject: [PATCH 3/5] OIS include path - case sensitive on linux
|
||||||
|
|
||||||
|
---
|
||||||
|
CMake/Modules/FindOIS.cmake | 6 ++++--
|
||||||
|
src/Skybolt/SkyboltEngine/Input/InputPlatformOis.cpp | 10 +++++-----
|
||||||
|
2 files changed, 9 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMake/Modules/FindOIS.cmake b/CMake/Modules/FindOIS.cmake
|
||||||
|
index 8c4ef17..e98af3f 100644
|
||||||
|
--- a/CMake/Modules/FindOIS.cmake
|
||||||
|
+++ b/CMake/Modules/FindOIS.cmake
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
# OIS_INCLUDE_DIR, where to find headers
|
||||||
|
|
||||||
|
|
||||||
|
-FIND_PATH(OIS_INCLUDE_DIR OIS/OIS.h
|
||||||
|
+FIND_PATH(OIS_INCLUDE_DIR ois/OIS.h
|
||||||
|
PATHS
|
||||||
|
$ENV{OGRE_DEPENDENCIES_DIR}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
@@ -15,16 +15,18 @@ FIND_LIBRARY(OIS_LIBRARY_R
|
||||||
|
NAMES OIS
|
||||||
|
PATHS
|
||||||
|
$ENV{OGRE_DEPENDENCIES_DIR}/lib/Release
|
||||||
|
+ $ENV{OGRE_DEPENDENCIES_DIR}/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(OIS_LIBRARY_D
|
||||||
|
NAMES OISd OIS
|
||||||
|
PATHS
|
||||||
|
$ENV{OGRE_DEPENDENCIES_DIR}/lib/Debug
|
||||||
|
+ $ENV{OGRE_DEPENDENCIES_DIR}/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(OIS_LIBRARIES optimized ${OIS_LIBRARY_R} debug ${OIS_LIBRARY_D})
|
||||||
|
|
||||||
|
IF(OIS_LIBRARY AND OIS_INCLUDE_DIR)
|
||||||
|
SET(OIS_FOUND "YES")
|
||||||
|
-ENDIF()
|
||||||
|
\ No newline at end of file
|
||||||
|
+ENDIF()
|
||||||
|
diff --git a/src/Skybolt/SkyboltEngine/Input/InputPlatformOis.cpp b/src/Skybolt/SkyboltEngine/Input/InputPlatformOis.cpp
|
||||||
|
index 9e666ae..37644d3 100644
|
||||||
|
--- a/src/Skybolt/SkyboltEngine/Input/InputPlatformOis.cpp
|
||||||
|
+++ b/src/Skybolt/SkyboltEngine/Input/InputPlatformOis.cpp
|
||||||
|
@@ -6,11 +6,11 @@
|
||||||
|
|
||||||
|
#include "InputPlatformOis.h"
|
||||||
|
|
||||||
|
-#include <OIS/OISMouse.h>
|
||||||
|
-#include <OIS/OISKeyboard.h>
|
||||||
|
-#include <OIS/OISJoyStick.h>
|
||||||
|
-#include <OIS/OISInputManager.h>
|
||||||
|
-#include <OIS/OISException.h>
|
||||||
|
+#include <ois/OISMouse.h>
|
||||||
|
+#include <ois/OISKeyboard.h>
|
||||||
|
+#include <ois/OISJoyStick.h>
|
||||||
|
+#include <ois/OISInputManager.h>
|
||||||
|
+#include <ois/OISException.h>
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <boost/foreach.hpp>
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From 173e6088e2aada37e2da44100d705ed46f283f79 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Ross <pross@xvid.org>
|
||||||
|
Date: Sun, 20 Dec 2020 20:00:36 +1100
|
||||||
|
Subject: [PATCH 4/5] BrunetonAtmosphereGeneratorTests: increase margin for
|
||||||
|
intel gpu
|
||||||
|
|
||||||
|
---
|
||||||
|
.../SkyboltVisTests/BrunetonAtmosphereGeneratorTests.cpp | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/Skybolt/SkyboltVisTests/BrunetonAtmosphereGeneratorTests.cpp b/src/Skybolt/SkyboltVisTests/BrunetonAtmosphereGeneratorTests.cpp
|
||||||
|
index 59d706b..b93b7c2 100644
|
||||||
|
--- a/src/Skybolt/SkyboltVisTests/BrunetonAtmosphereGeneratorTests.cpp
|
||||||
|
+++ b/src/Skybolt/SkyboltVisTests/BrunetonAtmosphereGeneratorTests.cpp
|
||||||
|
@@ -148,7 +148,7 @@ TEST_CASE("Precomputed BruentonAtmosphere matches Bruenton's reference implement
|
||||||
|
{
|
||||||
|
auto image = callback->capturedImages.at(1);
|
||||||
|
const float* data = reinterpret_cast<const float*>(image->getDataPointer());
|
||||||
|
- CHECK(data[100000] == Approx(0.093628).margin(epsilon));
|
||||||
|
+ CHECK(data[100000] == Approx(0.093628).margin(0.00013));
|
||||||
|
CHECK(data[200000] == Approx(0.085327).margin(epsilon));
|
||||||
|
CHECK(data[300000] == Approx(0.190308).margin(epsilon));
|
||||||
|
CHECK(data[400000] == Approx(0.0).margin(epsilon));
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
From 8331c1471da438757f47a7f26d404f201fe6e678 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Ross <pross@xvid.org>
|
||||||
|
Date: Sun, 20 Dec 2020 20:00:36 +1100
|
||||||
|
Subject: [PATCH 5/5] Sky.frag: gl_FragColor is deprecated n GLSL4
|
||||||
|
|
||||||
|
---
|
||||||
|
Assets/Shaders/Sky.frag | 7 ++++---
|
||||||
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Assets/Shaders/Sky.frag b/Assets/Shaders/Sky.frag
|
||||||
|
index 4715058..a695a24 100644
|
||||||
|
--- a/Assets/Shaders/Sky.frag
|
||||||
|
+++ b/Assets/Shaders/Sky.frag
|
||||||
|
@@ -12,11 +12,12 @@ in vec3 scattering;
|
||||||
|
in vec3 singleScattering;
|
||||||
|
in vec3 fragPosRelCamera;
|
||||||
|
|
||||||
|
+out vec4 FragColor;
|
||||||
|
+
|
||||||
|
uniform vec3 lightDirection;
|
||||||
|
|
||||||
|
void main(void)
|
||||||
|
{
|
||||||
|
vec3 viewDir = normalize(fragPosRelCamera);
|
||||||
|
- gl_FragColor.rgb = GetSkyRadianceFromScattering(scattering, singleScattering, viewDir, lightDirection);
|
||||||
|
- gl_FragColor.a = 1.0;
|
||||||
|
-}
|
||||||
|
\ No newline at end of file
|
||||||
|
+ FragColor = vec4(GetSkyRadianceFromScattering(scattering, singleScattering, viewDir, lightDirection), 1.0);
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
24
patches/toolwindowmanager/0001-include-qtabbar.patch
Normal file
24
patches/toolwindowmanager/0001-include-qtabbar.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
From 1ce56e3b8d04c5715072b3305e26622c3b55c85a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Ross <pross@xvid.org>
|
||||||
|
Date: Sun, 20 Dec 2020 20:37:05 +1100
|
||||||
|
Subject: [PATCH] include qtabbar
|
||||||
|
|
||||||
|
---
|
||||||
|
libqtoolwindowmanager/qtoolwindowmanager.h | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/libqtoolwindowmanager/qtoolwindowmanager.h b/libqtoolwindowmanager/qtoolwindowmanager.h
|
||||||
|
index a6e5e97..961f398 100644
|
||||||
|
--- a/libqtoolwindowmanager/qtoolwindowmanager.h
|
||||||
|
+++ b/libqtoolwindowmanager/qtoolwindowmanager.h
|
||||||
|
@@ -76,6 +76,7 @@
|
||||||
|
#include <QtGlobal>
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
#include <QtWidgets/qwidget.h>
|
||||||
|
+#include <QtWidgets/QTabBar>
|
||||||
|
#else
|
||||||
|
#include <QtGui/qwidget.h>
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user