mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 04:00:37 -06:00
Merge pull request #1271 from OpenSpace/feature/stringview
Feature/stringview
This commit is contained in:
@@ -112,6 +112,7 @@ begin_header("Dependency: SGCT")
|
||||
|
||||
set(SGCT_TEXT OFF CACHE BOOL "" FORCE)
|
||||
set(SGCT_DEP_INCLUDE_FREETYPE OFF CACHE BOOL "" FORCE)
|
||||
set(SGCT_DEP_INCLUDE_FMT OFF CACHE BOOL "" FORCE)
|
||||
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct)
|
||||
target_include_directories(OpenSpace SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct/include)
|
||||
|
||||
Submodule apps/OpenSpace/ext/sgct updated: 786853dc46...f51dcffcc1
Submodule ext/ghoul updated: 0783e03124...44531db21c
@@ -68,7 +68,6 @@ protected:
|
||||
DelayedVariable<glm::dvec2, double> velocity;
|
||||
};
|
||||
|
||||
|
||||
double _sensitivity = 0.0;
|
||||
|
||||
InteractionState _globalRotationState;
|
||||
|
||||
@@ -106,12 +106,46 @@ private:
|
||||
namespace ghoul {
|
||||
|
||||
template <>
|
||||
std::string to_string(
|
||||
const openspace::interaction::JoystickCameraStates::AxisType& value);
|
||||
inline std::string to_string(
|
||||
const openspace::interaction::JoystickCameraStates::AxisType& value)
|
||||
{
|
||||
using T = openspace::interaction::JoystickCameraStates::AxisType;
|
||||
switch (value) {
|
||||
case T::None: return "None";
|
||||
case T::OrbitX: return "Orbit X";
|
||||
case T::OrbitY: return "Orbit Y";
|
||||
case T::ZoomIn: return "Zoom In";
|
||||
case T::ZoomOut: return "Zoom Out";
|
||||
case T::LocalRollX: return "LocalRoll X";
|
||||
case T::LocalRollY: return "LocalRoll Y";
|
||||
case T::GlobalRollX: return "GlobalRoll X";
|
||||
case T::GlobalRollY: return "GlobalRoll Y";
|
||||
case T::PanX: return "Pan X";
|
||||
case T::PanY: return "Pan Y";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::interaction::JoystickCameraStates::AxisType
|
||||
from_string(const std::string& string);
|
||||
constexpr openspace::interaction::JoystickCameraStates::AxisType
|
||||
from_string(std::string_view string)
|
||||
{
|
||||
using T = openspace::interaction::JoystickCameraStates::AxisType;
|
||||
|
||||
if (string == "None") { return T::None; }
|
||||
if (string == "Orbit X") { return T::OrbitX; }
|
||||
if (string == "Orbit Y") { return T::OrbitY; }
|
||||
if (string == "Zoom In") { return T::ZoomIn; }
|
||||
if (string == "Zoom Out") { return T::ZoomOut; }
|
||||
if (string == "LocalRoll X") { return T::LocalRollX; }
|
||||
if (string == "LocalRoll Y") { return T::LocalRollY; }
|
||||
if (string == "GlobalRoll X") { return T::GlobalRollX; }
|
||||
if (string == "GlobalRoll Y") { return T::GlobalRollY; }
|
||||
if (string == "Pan X") { return T::PanX; }
|
||||
if (string == "Pan Y") { return T::PanY; }
|
||||
|
||||
throw RuntimeError("Unkonwn axis type '" + std::string(string) + "'");
|
||||
}
|
||||
|
||||
} // namespace ghoul
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef __OPENSPACE_CORE___JOYSTICKINPUTSTATE___H__
|
||||
#define __OPENSPACE_CORE___JOYSTICKINPUTSTATE___H__
|
||||
|
||||
#include <ghoul/misc/assert.h>
|
||||
#include <ghoul/misc/exception.h>
|
||||
#include <ghoul/misc/stringconversion.h>
|
||||
#include <array>
|
||||
#include <memory>
|
||||
@@ -113,10 +115,25 @@ struct JoystickInputStates : public std::array<JoystickInputState, MaxJoysticks>
|
||||
namespace ghoul {
|
||||
|
||||
template <>
|
||||
std::string to_string(const openspace::interaction::JoystickAction& value);
|
||||
inline std::string to_string(const openspace::interaction::JoystickAction& value) {
|
||||
switch (value) {
|
||||
case openspace::interaction::JoystickAction::Idle: return "Idle";
|
||||
case openspace::interaction::JoystickAction::Press: return "Press";
|
||||
case openspace::interaction::JoystickAction::Repeat: return "Repeat";
|
||||
case openspace::interaction::JoystickAction::Release: return "Release";
|
||||
default: throw MissingCaseException();
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::interaction::JoystickAction from_string(const std::string& str);
|
||||
constexpr openspace::interaction::JoystickAction from_string(std::string_view string) {
|
||||
if (string == "Idle") { return openspace::interaction::JoystickAction::Idle; }
|
||||
if (string == "Press") { return openspace::interaction::JoystickAction::Press; }
|
||||
if (string == "Repeat") { return openspace::interaction::JoystickAction::Repeat; }
|
||||
if (string == "Release") { return openspace::interaction::JoystickAction::Release; }
|
||||
|
||||
throw RuntimeError("Unknown action '" + std::string(string) + "'");
|
||||
}
|
||||
|
||||
} // namespace ghoul
|
||||
|
||||
|
||||
@@ -106,12 +106,46 @@ private:
|
||||
namespace ghoul {
|
||||
|
||||
template <>
|
||||
std::string to_string(
|
||||
const openspace::interaction::WebsocketCameraStates::AxisType& type);
|
||||
inline std::string to_string(
|
||||
const openspace::interaction::WebsocketCameraStates::AxisType& type)
|
||||
{
|
||||
using T = openspace::interaction::WebsocketCameraStates::AxisType;
|
||||
switch (type) {
|
||||
case T::None: return "None";
|
||||
case T::OrbitX: return "Orbit X";
|
||||
case T::OrbitY: return "Orbit Y";
|
||||
case T::ZoomIn: return "Zoom In";
|
||||
case T::ZoomOut: return "Zoom Out";
|
||||
case T::LocalRollX: return "LocalRoll X";
|
||||
case T::LocalRollY: return "LocalRoll Y";
|
||||
case T::GlobalRollX: return "GlobalRoll X";
|
||||
case T::GlobalRollY: return "GlobalRoll Y";
|
||||
case T::PanX: return "Pan X";
|
||||
case T::PanY: return "Pan Y";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::interaction::WebsocketCameraStates::AxisType
|
||||
from_string(const std::string& string);
|
||||
constexpr openspace::interaction::WebsocketCameraStates::AxisType from_string(
|
||||
std::string_view string)
|
||||
{
|
||||
using T = openspace::interaction::WebsocketCameraStates::AxisType;
|
||||
|
||||
if (string == "None") { return T::None; }
|
||||
if (string == "Orbit X") { return T::OrbitX; }
|
||||
if (string == "Orbit Y") { return T::OrbitY; }
|
||||
if (string == "Zoom In") { return T::ZoomIn; }
|
||||
if (string == "Zoom Out") { return T::ZoomOut; }
|
||||
if (string == "LocalRoll X") { return T::LocalRollX; }
|
||||
if (string == "LocalRoll Y") { return T::LocalRollY; }
|
||||
if (string == "GlobalRoll X") { return T::GlobalRollX; }
|
||||
if (string == "GlobalRoll Y") { return T::GlobalRollY; }
|
||||
if (string == "Pan X") { return T::PanX; }
|
||||
if (string == "Pan Y") { return T::PanY; }
|
||||
|
||||
throw RuntimeError("Unknown axis type '" + std::string(string) + "'");
|
||||
}
|
||||
|
||||
} // namespace ghoul
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef __OPENSPACE_CORE___WEBSOCKETINPUTSTATE___H__
|
||||
#define __OPENSPACE_CORE___WEBSOCKETINPUTSTATE___H__
|
||||
|
||||
#include <ghoul/misc/assert.h>
|
||||
#include <ghoul/misc/exception.h>
|
||||
#include <ghoul/misc/stringconversion.h>
|
||||
#include <array>
|
||||
#include <memory>
|
||||
@@ -115,10 +117,25 @@ struct WebsocketInputStates : public std::unordered_map<size_t, WebsocketInputSt
|
||||
namespace ghoul {
|
||||
|
||||
template <>
|
||||
std::string to_string(const openspace::interaction::WebsocketAction& action);
|
||||
inline std::string to_string(const openspace::interaction::WebsocketAction& action) {
|
||||
switch (action) {
|
||||
case openspace::interaction::WebsocketAction::Idle: return "Idle";
|
||||
case openspace::interaction::WebsocketAction::Press: return "Press";
|
||||
case openspace::interaction::WebsocketAction::Repeat: return "Repeat";
|
||||
case openspace::interaction::WebsocketAction::Release: return "Release";
|
||||
default: throw MissingCaseException();
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::interaction::WebsocketAction from_string(const std::string& str);
|
||||
constexpr openspace::interaction::WebsocketAction from_string(std::string_view string) {
|
||||
if (string == "Idle") { return openspace::interaction::WebsocketAction::Idle; }
|
||||
if (string == "Press") { return openspace::interaction::WebsocketAction::Press; }
|
||||
if (string == "Repeat") { return openspace::interaction::WebsocketAction::Repeat; }
|
||||
if (string == "Release") { return openspace::interaction::WebsocketAction::Release; }
|
||||
|
||||
throw RuntimeError("Unknown action '" + std::string(string) + "'");
|
||||
}
|
||||
|
||||
} // namespace ghoul
|
||||
|
||||
|
||||
@@ -429,10 +429,7 @@ void DashboardItemAngle::render(glm::vec2& penPosition) {
|
||||
glm::vec2 DashboardItemAngle::size() const {
|
||||
constexpr const double Angle = 120;
|
||||
|
||||
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
|
||||
*_font,
|
||||
"Angle: " + std::to_string(Angle)
|
||||
).boundingBox;
|
||||
return _font->boundingBox("Angle: " + std::to_string(Angle));
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -119,10 +119,9 @@ void DashboardItemDate::render(glm::vec2& penPosition) {
|
||||
}
|
||||
|
||||
glm::vec2 DashboardItemDate::size() const {
|
||||
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
|
||||
*_font,
|
||||
return _font->boundingBox(
|
||||
fmt::format("Date: {} UTC", global::timeManager.time().UTC())
|
||||
).boundingBox;
|
||||
);
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -463,10 +463,9 @@ glm::vec2 DashboardItemDistance::size() const {
|
||||
dist = { convertedD, nameForDistanceUnit(unit, convertedD != 1.0) };
|
||||
}
|
||||
|
||||
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
|
||||
*_font,
|
||||
return _font->boundingBox(
|
||||
fmt::format("Distance from focus: {} {}", dist.first, dist.second)
|
||||
).boundingBox;
|
||||
);
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -301,21 +301,14 @@ void DashboardItemFramerate::render(glm::vec2& penPosition) {
|
||||
}
|
||||
|
||||
glm::vec2 DashboardItemFramerate::size() const {
|
||||
FrametimeType frametimeType = FrametimeType(_frametimeType.value());
|
||||
const std::string output = format(
|
||||
frametimeType,
|
||||
_minDeltaTimeCache,
|
||||
_maxDeltaTimeCache
|
||||
);
|
||||
const FrametimeType t = FrametimeType(_frametimeType.value());
|
||||
const std::string output = format(t, _minDeltaTimeCache, _maxDeltaTimeCache);
|
||||
|
||||
if (output.empty()) {
|
||||
return { 0.f, 0.f };
|
||||
}
|
||||
|
||||
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
|
||||
*_font,
|
||||
output
|
||||
).boundingBox;
|
||||
return _font->boundingBox(output);
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -208,10 +208,7 @@ glm::vec2 DashboardItemParallelConnection::size() const {
|
||||
}
|
||||
|
||||
if (!connectionInfo.empty()) {
|
||||
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
|
||||
*_font,
|
||||
connectionInfo
|
||||
).boundingBox;
|
||||
return _font->boundingBox(connectionInfo);
|
||||
}
|
||||
else {
|
||||
return { 0.f, 0.f };
|
||||
|
||||
@@ -166,10 +166,7 @@ void DashboardItemPropertyValue::render(glm::vec2& penPosition) {
|
||||
}
|
||||
|
||||
glm::vec2 DashboardItemPropertyValue::size() const {
|
||||
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
|
||||
*_font,
|
||||
_displayString.value()
|
||||
).boundingBox;
|
||||
return _font->boundingBox(_displayString.value());
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -238,13 +238,12 @@ glm::vec2 DashboardItemSimulationIncrement::size() const {
|
||||
deltaTime = { convertedT, nameForTimeUnit(unit, convertedT != 1.0) };
|
||||
}
|
||||
|
||||
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
|
||||
*_font,
|
||||
return _font->boundingBox(
|
||||
fmt::format(
|
||||
"Simulation increment: {:.1f} {:s} / second",
|
||||
deltaTime.first, deltaTime.second
|
||||
)
|
||||
).boundingBox;
|
||||
);
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -229,10 +229,9 @@ glm::vec2 DashboardItemVelocity::size() const {
|
||||
dist = { convertedD, nameForDistanceUnit(unit, convertedD != 1.0) };
|
||||
}
|
||||
|
||||
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
|
||||
*_font,
|
||||
return _font->boundingBox(
|
||||
fmt::format("Camera velocity: {} {}/s", dist.first, dist.second)
|
||||
).boundingBox;
|
||||
);
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -75,7 +75,6 @@ set(SOURCE_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/layer.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/layeradjustment.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/layergroup.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/layergroupid.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/layermanager.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/layerrendersettings.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/memoryawaretilecache.cpp
|
||||
|
||||
@@ -199,10 +199,9 @@ void DashboardItemGlobeLocation::render(glm::vec2& penPosition) {
|
||||
);
|
||||
}
|
||||
glm::vec2 DashboardItemGlobeLocation::size() const {
|
||||
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
|
||||
*_font,
|
||||
return _font->boundingBox(
|
||||
fmt::format("Position: {}, {} Altitude: {}", 1.f, 1.f, 1.f)
|
||||
).boundingBox;
|
||||
);
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
* without restriction, including without limitation the rights to use, copy, modify, *
|
||||
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
|
||||
* permit persons to whom the Software is furnished to do so, subject to the following *
|
||||
* conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all copies *
|
||||
* or substantial portions of the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
|
||||
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
|
||||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
|
||||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
||||
****************************************************************************************/
|
||||
|
||||
#include <modules/globebrowsing/src/layergroupid.h>
|
||||
|
||||
using namespace openspace::globebrowsing::layergroupid;
|
||||
|
||||
namespace ghoul {
|
||||
|
||||
template <>
|
||||
TypeID from_string(const std::string& string) {
|
||||
for (int i = 0; i < NUM_LAYER_TYPES; ++i) {
|
||||
if (string == LAYER_TYPE_NAMES[i]) {
|
||||
return static_cast<TypeID>(i);
|
||||
}
|
||||
}
|
||||
return TypeID::Unknown;
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::globebrowsing::layergroupid::GroupID from_string(const std::string& string) {
|
||||
for (int i = 0; i < NUM_LAYER_GROUPS; ++i) {
|
||||
if (string == LAYER_GROUP_IDENTIFIERS[i]) {
|
||||
return static_cast<GroupID>(i);
|
||||
}
|
||||
}
|
||||
return GroupID::Unknown;
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::globebrowsing::layergroupid::AdjustmentTypeID from_string(
|
||||
const std::string& string)
|
||||
{
|
||||
for (int i = 0; i < NUM_ADJUSTMENT_TYPES; ++i) {
|
||||
if (string == ADJUSTMENT_TYPE_NAMES[i]) {
|
||||
return static_cast<AdjustmentTypeID>(i);
|
||||
}
|
||||
}
|
||||
return AdjustmentTypeID::None;
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::globebrowsing::layergroupid::BlendModeID from_string(const std::string& string)
|
||||
{
|
||||
for (int i = 0; i < NUM_BLEND_MODES; ++i) {
|
||||
if (string == BLEND_MODE_NAMES[i]) {
|
||||
return static_cast<BlendModeID>(i);
|
||||
}
|
||||
}
|
||||
return BlendModeID::Normal;
|
||||
}
|
||||
|
||||
} // namespace ghoul
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
namespace openspace::globebrowsing::layergroupid {
|
||||
|
||||
static constexpr int NUM_LAYER_GROUPS = 5;
|
||||
static constexpr const int NUM_LAYER_GROUPS = 5;
|
||||
static constexpr const char* LAYER_GROUP_IDENTIFIERS[NUM_LAYER_GROUPS] = {
|
||||
"HeightLayers",
|
||||
"ColorLayers",
|
||||
@@ -56,7 +56,7 @@ enum GroupID {
|
||||
Unknown,
|
||||
};
|
||||
|
||||
static constexpr int NUM_LAYER_TYPES = 8;
|
||||
static constexpr const int NUM_LAYER_TYPES = 8;
|
||||
static constexpr const char* LAYER_TYPE_NAMES[NUM_LAYER_TYPES] = {
|
||||
"DefaultTileLayer",
|
||||
"SingleImageTileLayer",
|
||||
@@ -124,18 +124,52 @@ enum class BlendModeID {
|
||||
namespace ghoul {
|
||||
|
||||
template <>
|
||||
openspace::globebrowsing::layergroupid::TypeID from_string(const std::string& string);
|
||||
constexpr openspace::globebrowsing::layergroupid::TypeID from_string(
|
||||
std::string_view string)
|
||||
{
|
||||
for (int i = 0; i < openspace::globebrowsing::layergroupid::NUM_LAYER_TYPES; ++i) {
|
||||
if (string == openspace::globebrowsing::layergroupid::LAYER_TYPE_NAMES[i]) {
|
||||
return static_cast<openspace::globebrowsing::layergroupid::TypeID>(i);
|
||||
}
|
||||
}
|
||||
return openspace::globebrowsing::layergroupid::TypeID::Unknown;
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::globebrowsing::layergroupid::GroupID from_string(const std::string& string);
|
||||
constexpr openspace::globebrowsing::layergroupid::GroupID from_string(
|
||||
std::string_view string)
|
||||
{
|
||||
for (int i = 0; i < openspace::globebrowsing::layergroupid::NUM_LAYER_GROUPS; ++i) {
|
||||
if (string == openspace::globebrowsing::layergroupid::LAYER_GROUP_IDENTIFIERS[i]) {
|
||||
return static_cast<openspace::globebrowsing::layergroupid::GroupID>(i);
|
||||
}
|
||||
}
|
||||
return openspace::globebrowsing::layergroupid::GroupID::Unknown;
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::globebrowsing::layergroupid::AdjustmentTypeID from_string(
|
||||
const std::string& string);
|
||||
constexpr openspace::globebrowsing::layergroupid::AdjustmentTypeID from_string(
|
||||
std::string_view string)
|
||||
{
|
||||
for (int i = 0; i < openspace::globebrowsing::layergroupid::NUM_ADJUSTMENT_TYPES; ++i) {
|
||||
if (string == openspace::globebrowsing::layergroupid::ADJUSTMENT_TYPE_NAMES[i]) {
|
||||
return static_cast<openspace::globebrowsing::layergroupid::AdjustmentTypeID>(i);
|
||||
}
|
||||
}
|
||||
return openspace::globebrowsing::layergroupid::AdjustmentTypeID::None;
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::globebrowsing::layergroupid::BlendModeID from_string(
|
||||
const std::string& string);
|
||||
constexpr openspace::globebrowsing::layergroupid::BlendModeID from_string(
|
||||
std::string_view string)
|
||||
{
|
||||
for (int i = 0; i < openspace::globebrowsing::layergroupid::NUM_BLEND_MODES; ++i) {
|
||||
if (string == openspace::globebrowsing::layergroupid::BLEND_MODE_NAMES[i]) {
|
||||
return static_cast<openspace::globebrowsing::layergroupid::BlendModeID>(i);
|
||||
}
|
||||
}
|
||||
return openspace::globebrowsing::layergroupid::BlendModeID::Normal;
|
||||
}
|
||||
|
||||
} // ghoul
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
|
||||
namespace ghoul {
|
||||
template <>
|
||||
openspace::globebrowsing::tileprovider::TemporalTileProvider::TimeFormatType
|
||||
from_string(const std::string& string)
|
||||
constexpr openspace::globebrowsing::tileprovider::TemporalTileProvider::TimeFormatType
|
||||
from_string(std::string_view string)
|
||||
{
|
||||
using namespace openspace::globebrowsing::tileprovider;
|
||||
if (string == "YYYY-MM-DD") {
|
||||
@@ -66,7 +66,7 @@ namespace ghoul {
|
||||
return TemporalTileProvider::TimeFormatType::YYYYMMDD_hhmm;
|
||||
}
|
||||
else {
|
||||
throw ghoul::RuntimeError("Unknown timeformat " + string);
|
||||
throw ghoul::RuntimeError("Unknown timeformat '" + std::string(string) + "'");
|
||||
}
|
||||
}
|
||||
} // namespace ghoul
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <modules/multiresvolume/rendering/localerrorhistogrammanager.h>
|
||||
#include <openspace/rendering/transferfunction.h>
|
||||
#include <ghoul/misc/assert.h>
|
||||
#include <algorithm>
|
||||
|
||||
namespace {
|
||||
bool compareSplitPoints(const openspace::BrickSelection& a,
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <openspace/rendering/transferfunction.h>
|
||||
#include <openspace/util/histogram.h>
|
||||
#include <ghoul/misc/assert.h>
|
||||
#include <algorithm>
|
||||
|
||||
namespace {
|
||||
bool compareSplitPoints(const openspace::BrickSelection& a,
|
||||
|
||||
@@ -337,23 +337,21 @@ glm::vec2 DashboardItemInstruments::size() const {
|
||||
|
||||
size = addToBoundingbox(
|
||||
size,
|
||||
renderer.boundingBox(*_font, "Next instrument activity:").boundingBox
|
||||
_font->boundingBox("Next instrument activity:")
|
||||
);
|
||||
|
||||
size = addToBoundingbox(
|
||||
size,
|
||||
renderer.boundingBox(
|
||||
*_font,
|
||||
_font->boundingBox(
|
||||
fmt::format("{:.0f} s {:s} {:.1f} %", remaining, progress, t * 100.f)
|
||||
).boundingBox
|
||||
)
|
||||
);
|
||||
|
||||
size = addToBoundingbox(
|
||||
size,
|
||||
renderer.boundingBox(
|
||||
*_font,
|
||||
_font->boundingBox(
|
||||
fmt::format("Data acquisition time: {}", str)
|
||||
).boundingBox
|
||||
)
|
||||
);
|
||||
}
|
||||
std::pair<double, std::string> nextTarget = sequencer.nextTarget(currentTime);
|
||||
@@ -363,9 +361,6 @@ glm::vec2 DashboardItemInstruments::size() const {
|
||||
return size;
|
||||
}
|
||||
|
||||
using FR = ghoul::fontrendering::FontRenderer;
|
||||
FR& renderer = FR::defaultRenderer();
|
||||
|
||||
const int timeleft = static_cast<int>(nextTarget.first - currentTime);
|
||||
|
||||
const int hour = timeleft / 3600;
|
||||
@@ -393,20 +388,16 @@ glm::vec2 DashboardItemInstruments::size() const {
|
||||
|
||||
size = addToBoundingbox(
|
||||
size,
|
||||
renderer.boundingBox(
|
||||
*_font,
|
||||
_font->boundingBox(
|
||||
fmt::format("Data acquisition adjacency: [{}:{}:{}]", hh, mm, ss)
|
||||
).boundingBox
|
||||
)
|
||||
);
|
||||
|
||||
size.y += _font->height();
|
||||
|
||||
size = addToBoundingbox(
|
||||
size,
|
||||
ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
|
||||
*_font,
|
||||
"Active Instruments:"
|
||||
).boundingBox
|
||||
_font->boundingBox("Active Instruments:")
|
||||
);
|
||||
return size;
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
#include <openspace/engine/globals.h>
|
||||
#include <openspace/interaction/inputstate.h>
|
||||
#include <openspace/scripting/scriptengine.h>
|
||||
#include <utility>
|
||||
|
||||
#include <ghoul/misc/exception.h>
|
||||
#include <cmath>
|
||||
#include <utility>
|
||||
|
||||
namespace openspace::interaction {
|
||||
|
||||
@@ -224,50 +224,3 @@ std::vector<std::string> JoystickCameraStates::buttonCommand(int button) const {
|
||||
|
||||
|
||||
} // namespace openspace::interaction
|
||||
|
||||
namespace ghoul {
|
||||
|
||||
template <>
|
||||
std::string to_string(const openspace::interaction::JoystickCameraStates::AxisType& value)
|
||||
{
|
||||
using T = openspace::interaction::JoystickCameraStates::AxisType;
|
||||
switch (value) {
|
||||
case T::None: return "None";
|
||||
case T::OrbitX: return "Orbit X";
|
||||
case T::OrbitY: return "Orbit Y";
|
||||
case T::ZoomIn: return "Zoom In";
|
||||
case T::ZoomOut: return "Zoom Out";
|
||||
case T::LocalRollX: return "LocalRoll X";
|
||||
case T::LocalRollY: return "LocalRoll Y";
|
||||
case T::GlobalRollX: return "GlobalRoll X";
|
||||
case T::GlobalRollY: return "GlobalRoll Y";
|
||||
case T::PanX: return "Pan X";
|
||||
case T::PanY: return "Pan Y";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::interaction::JoystickCameraStates::AxisType from_string(
|
||||
const std::string& string)
|
||||
{
|
||||
using T = openspace::interaction::JoystickCameraStates::AxisType;
|
||||
|
||||
static const std::map<std::string, T> Map = {
|
||||
{ "None", T::None },
|
||||
{ "Orbit X", T::OrbitX },
|
||||
{ "Orbit Y", T::OrbitY },
|
||||
{ "Zoom In", T::ZoomIn },
|
||||
{ "Zoom Out", T::ZoomOut },
|
||||
{ "LocalRoll X", T::LocalRollX },
|
||||
{ "LocalRoll Y", T::LocalRollY },
|
||||
{ "GlobalRoll X", T::GlobalRollX },
|
||||
{ "GlobalRoll Y", T::GlobalRollY },
|
||||
{ "Pan X", T::PanX },
|
||||
{ "Pan Y", T::PanY }
|
||||
};
|
||||
|
||||
return Map.at(string);
|
||||
}
|
||||
|
||||
} // namespace ghoul
|
||||
|
||||
@@ -68,31 +68,3 @@ bool JoystickInputStates::button(int button, JoystickAction action) const {
|
||||
}
|
||||
|
||||
} // namespace openspace::interaction
|
||||
|
||||
namespace ghoul {
|
||||
|
||||
template <>
|
||||
std::string to_string(const openspace::interaction::JoystickAction& value) {
|
||||
switch (value) {
|
||||
case openspace::interaction::JoystickAction::Idle: return "Idle";
|
||||
case openspace::interaction::JoystickAction::Press: return "Press";
|
||||
case openspace::interaction::JoystickAction::Repeat: return "Repeat";
|
||||
case openspace::interaction::JoystickAction::Release: return "Release";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::interaction::JoystickAction from_string(const std::string& string) {
|
||||
static const std::map<std::string, openspace::interaction::JoystickAction> Map = {
|
||||
{ "Idle", openspace::interaction::JoystickAction::Idle },
|
||||
{ "Press", openspace::interaction::JoystickAction::Press },
|
||||
{ "Repeat", openspace::interaction::JoystickAction::Repeat },
|
||||
{ "Release", openspace::interaction::JoystickAction::Release }
|
||||
};
|
||||
|
||||
return Map.at(string);
|
||||
|
||||
}
|
||||
|
||||
} // namespace ghoul
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <openspace/engine/openspaceengine.h>
|
||||
#include <openspace/interaction/inputstate.h>
|
||||
#include <openspace/scripting/scriptengine.h>
|
||||
#include <ghoul/misc/exception.h>
|
||||
#include <ghoul/misc/stringconversion.h>
|
||||
#include <utility>
|
||||
#include <cmath>
|
||||
@@ -212,52 +213,4 @@ std::vector<std::string> WebsocketCameraStates::buttonCommand(int button) const
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
} // namespace openspace::interaction
|
||||
|
||||
namespace ghoul {
|
||||
|
||||
template <>
|
||||
std::string to_string(const openspace::interaction::WebsocketCameraStates::AxisType& type)
|
||||
{
|
||||
using T = openspace::interaction::WebsocketCameraStates::AxisType;
|
||||
switch (type) {
|
||||
case T::None: return "None";
|
||||
case T::OrbitX: return "Orbit X";
|
||||
case T::OrbitY: return "Orbit Y";
|
||||
case T::ZoomIn: return "Zoom In";
|
||||
case T::ZoomOut: return "Zoom Out";
|
||||
case T::LocalRollX: return "LocalRoll X";
|
||||
case T::LocalRollY: return "LocalRoll Y";
|
||||
case T::GlobalRollX: return "GlobalRoll X";
|
||||
case T::GlobalRollY: return "GlobalRoll Y";
|
||||
case T::PanX: return "Pan X";
|
||||
case T::PanY: return "Pan Y";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::interaction::WebsocketCameraStates::AxisType from_string(
|
||||
const std::string& string)
|
||||
{
|
||||
using T = openspace::interaction::WebsocketCameraStates::AxisType;
|
||||
|
||||
static const std::map<std::string, T> Map = {
|
||||
{ "None", T::None },
|
||||
{ "Orbit X", T::OrbitX },
|
||||
{ "Orbit Y", T::OrbitY },
|
||||
{ "Zoom In", T::ZoomIn },
|
||||
{ "Zoom Out", T::ZoomOut },
|
||||
{ "LocalRoll X", T::LocalRollX },
|
||||
{ "LocalRoll Y", T::LocalRollY },
|
||||
{ "GlobalRoll X", T::GlobalRollX },
|
||||
{ "GlobalRoll Y", T::GlobalRollY },
|
||||
{ "Pan X", T::PanX },
|
||||
{ "Pan Y", T::PanY }
|
||||
};
|
||||
|
||||
return Map.at(string);
|
||||
}
|
||||
|
||||
} // namespace ghoul
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <openspace/interaction/websocketinputstate.h>
|
||||
|
||||
#include <ghoul/misc/exception.h>
|
||||
#include <ghoul/misc/invariants.h>
|
||||
#include <ghoul/misc/stringconversion.h>
|
||||
#include <algorithm>
|
||||
@@ -71,31 +72,3 @@ bool WebsocketInputStates::button(int button, WebsocketAction action) const {
|
||||
}
|
||||
|
||||
} // namespace openspace::interaction
|
||||
|
||||
namespace ghoul {
|
||||
|
||||
template <>
|
||||
std::string to_string(const openspace::interaction::WebsocketAction& action) {
|
||||
switch (action) {
|
||||
case openspace::interaction::WebsocketAction::Idle: return "Idle";
|
||||
case openspace::interaction::WebsocketAction::Press: return "Press";
|
||||
case openspace::interaction::WebsocketAction::Repeat: return "Repeat";
|
||||
case openspace::interaction::WebsocketAction::Release: return "Release";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
openspace::interaction::WebsocketAction from_string(const std::string& string) {
|
||||
static const std::map<std::string, openspace::interaction::WebsocketAction> Map = {
|
||||
{ "Idle", openspace::interaction::WebsocketAction::Idle },
|
||||
{ "Press", openspace::interaction::WebsocketAction::Press },
|
||||
{ "Repeat", openspace::interaction::WebsocketAction::Repeat },
|
||||
{ "Release", openspace::interaction::WebsocketAction::Release }
|
||||
};
|
||||
|
||||
return Map.at(string);
|
||||
|
||||
}
|
||||
|
||||
} // namespace ghoul
|
||||
|
||||
@@ -268,16 +268,15 @@ void LoadingScreen::render() {
|
||||
"Loading...";
|
||||
// We use "Loading" to center the text, but render "Loading..." to make it look more
|
||||
// pleasing
|
||||
const FR::BoundingBoxInformation bbox = renderer.boundingBox(
|
||||
*_loadingFont,
|
||||
const glm::vec2 bbox = _loadingFont->boundingBox(
|
||||
headline.substr(0, headline.size() - 2)
|
||||
);
|
||||
|
||||
const glm::vec2 loadingLl = glm::vec2(
|
||||
res.x / 2.f - bbox.boundingBox.x / 2.f,
|
||||
res.x / 2.f - bbox.x / 2.f,
|
||||
res.y * LoadingTextPosition
|
||||
);
|
||||
const glm::vec2 loadingUr = loadingLl + bbox.boundingBox;
|
||||
const glm::vec2 loadingUr = loadingLl + bbox;
|
||||
|
||||
renderer.render(*_loadingFont, loadingLl, headline);
|
||||
|
||||
@@ -286,16 +285,13 @@ void LoadingScreen::render() {
|
||||
if (_showMessage) {
|
||||
std::lock_guard<std::mutex> guard(_messageMutex);
|
||||
|
||||
FR::BoundingBoxInformation bboxMessage = renderer.boundingBox(
|
||||
*_messageFont,
|
||||
_message
|
||||
);
|
||||
const glm::vec2 bboxMessage = _messageFont->boundingBox(_message);
|
||||
|
||||
messageLl = glm::vec2(
|
||||
res.x / 2.f - bboxMessage.boundingBox.x / 2.f,
|
||||
res.x / 2.f - bboxMessage.x / 2.f,
|
||||
res.y * StatusMessageOffset
|
||||
);
|
||||
messageUr = messageLl + bboxMessage.boundingBox;
|
||||
messageUr = messageLl + bboxMessage;
|
||||
|
||||
|
||||
renderer.render(*_messageFont, messageLl, _message);
|
||||
@@ -322,8 +318,7 @@ void LoadingScreen::render() {
|
||||
if (!item.hasLocation) {
|
||||
// Compute a new location
|
||||
|
||||
const FR::BoundingBoxInformation b = renderer.boundingBox(
|
||||
*_itemFont,
|
||||
const glm::vec2 b = _itemFont->boundingBox(
|
||||
(item.name + " 100%\n99999999/99999999")
|
||||
);
|
||||
|
||||
@@ -338,15 +333,15 @@ void LoadingScreen::render() {
|
||||
for (; i < MaxNumberLocationSamples && !foundSpace; ++i) {
|
||||
std::uniform_int_distribution<int> distX(
|
||||
15,
|
||||
static_cast<int>(res.x - b.boundingBox.x - 15)
|
||||
static_cast<int>(res.x - b.x - 15)
|
||||
);
|
||||
std::uniform_int_distribution<int> distY(
|
||||
15,
|
||||
static_cast<int>(res.y - b.boundingBox.y - 15)
|
||||
static_cast<int>(res.y - b.y - 15)
|
||||
);
|
||||
|
||||
ll = { distX(_randomEngine), distY(_randomEngine) };
|
||||
ur = ll + b.boundingBox;
|
||||
ur = ll + b;
|
||||
|
||||
// Test against logo and text
|
||||
const bool logoOverlap = rectOverlaps(
|
||||
|
||||
@@ -676,10 +676,8 @@ void LuaConsole::render() {
|
||||
using namespace ghoul::fontrendering;
|
||||
|
||||
// Compute the current width of the string and console prefix.
|
||||
const float currentWidth = FontRenderer::defaultRenderer().boundingBox(
|
||||
*_font,
|
||||
"> " + currentCommand
|
||||
).boundingBox.x + inputLocation.x;
|
||||
const float currentWidth =
|
||||
_font->boundingBox("> " + currentCommand).x + inputLocation.x;
|
||||
|
||||
// Compute the overflow in pixels
|
||||
const float overflow = currentWidth - res.x * 0.995f;
|
||||
@@ -785,13 +783,8 @@ void LuaConsole::render() {
|
||||
res.y - _currentHeight + EntryFontSize
|
||||
);
|
||||
|
||||
const FontRenderer::BoundingBoxInformation bbox =
|
||||
FontRenderer::defaultRenderer().boundingBox(*_font, text);
|
||||
|
||||
return glm::vec2(
|
||||
loc.x + res.x - bbox.boundingBox.x - 10.f,
|
||||
loc.y
|
||||
);
|
||||
const glm::vec2 bbox = _font->boundingBox(text);
|
||||
return glm::vec2(loc.x + res.x - bbox.x - 10.f, loc.y);
|
||||
};
|
||||
|
||||
if (_remoteScripting) {
|
||||
|
||||
@@ -795,14 +795,10 @@ void RenderEngine::renderEndscreen() {
|
||||
glViewport(0, 0, res.x, res.y);
|
||||
|
||||
using FR = ghoul::fontrendering::FontRenderer;
|
||||
using BBox = FR::BoundingBoxInformation;
|
||||
BBox size = FR::defaultRenderer().boundingBox(
|
||||
*_fontDate,
|
||||
"Shutting down"
|
||||
);
|
||||
const glm::vec2 size = _fontDate->boundingBox("Shutting down");
|
||||
glm::vec2 penPosition = glm::vec2(
|
||||
fontResolution().x / 2 - size.boundingBox.x / 2,
|
||||
fontResolution().y / 2 - size.boundingBox.y / 2
|
||||
fontResolution().x / 2 - size.x / 2,
|
||||
fontResolution().y / 2 - size.y / 2
|
||||
);
|
||||
RenderFont(*_fontDate, penPosition, "Shutting down");
|
||||
}
|
||||
@@ -812,15 +808,13 @@ void RenderEngine::renderShutdownInformation(float timer, float fullTime) {
|
||||
|
||||
timer = std::max(timer, 0.f);
|
||||
|
||||
using BBox = ghoul::fontrendering::FontRenderer::BoundingBoxInformation;
|
||||
BBox size = ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
|
||||
*_fontDate,
|
||||
const glm::vec2 size = _fontDate->boundingBox(
|
||||
fmt::format("Shutdown in: {:.2f}s/{:.2f}s", timer, fullTime)
|
||||
);
|
||||
|
||||
glm::vec2 penPosition = glm::vec2(
|
||||
fontResolution().x - size.boundingBox.x - 10,
|
||||
fontResolution().y - size.boundingBox.y
|
||||
fontResolution().x - size.x - 10,
|
||||
fontResolution().y - size.y
|
||||
);
|
||||
|
||||
RenderFont(
|
||||
@@ -1246,13 +1240,9 @@ void RenderEngine::renderCameraInformation() {
|
||||
const glm::vec4 EnabledColor = glm::vec4(0.2f, 0.75f, 0.2f, 1.f);
|
||||
const glm::vec4 DisabledColor = glm::vec4(0.55f, 0.2f, 0.2f, 1.f);
|
||||
|
||||
using FR = ghoul::fontrendering::FontRenderer;
|
||||
const FR::BoundingBoxInformation rotationBox = FR::defaultRenderer().boundingBox(
|
||||
*_fontInfo,
|
||||
"Rotation"
|
||||
);
|
||||
const glm::vec2 rotationBox = _fontInfo->boundingBox("Rotation");
|
||||
|
||||
float penPosY = fontResolution().y - rotationBox.boundingBox.y;
|
||||
float penPosY = fontResolution().y - rotationBox.y;
|
||||
|
||||
constexpr const float YSeparation = 5.f;
|
||||
constexpr const float XSeparation = 5.f;
|
||||
@@ -1260,53 +1250,49 @@ void RenderEngine::renderCameraInformation() {
|
||||
const interaction::OrbitalNavigator& nav =
|
||||
global::navigationHandler.orbitalNavigator();
|
||||
|
||||
using FR = ghoul::fontrendering::FontRenderer;
|
||||
|
||||
_cameraButtonLocations.rotation = {
|
||||
fontResolution().x - rotationBox.boundingBox.x - XSeparation,
|
||||
fontResolution().x - rotationBox.x - XSeparation,
|
||||
fontResolution().y - penPosY,
|
||||
rotationBox.boundingBox.x,
|
||||
rotationBox.boundingBox.y
|
||||
rotationBox.x,
|
||||
rotationBox.y
|
||||
};
|
||||
FR::defaultRenderer().render(
|
||||
*_fontInfo,
|
||||
glm::vec2(fontResolution().x - rotationBox.boundingBox.x - XSeparation, penPosY),
|
||||
glm::vec2(fontResolution().x - rotationBox.x - XSeparation, penPosY),
|
||||
"Rotation",
|
||||
nav.hasRotationalFriction() ? EnabledColor : DisabledColor
|
||||
);
|
||||
penPosY -= rotationBox.boundingBox.y + YSeparation;
|
||||
penPosY -= rotationBox.y + YSeparation;
|
||||
|
||||
FR::BoundingBoxInformation zoomBox = FR::defaultRenderer().boundingBox(
|
||||
*_fontInfo,
|
||||
"Zoom"
|
||||
);
|
||||
const glm::vec2 zoomBox = _fontInfo->boundingBox("Zoom");
|
||||
|
||||
_cameraButtonLocations.zoom = {
|
||||
fontResolution().x - zoomBox.boundingBox.x - XSeparation,
|
||||
fontResolution().x - zoomBox.x - XSeparation,
|
||||
fontResolution().y - penPosY,
|
||||
zoomBox.boundingBox.x,
|
||||
zoomBox.boundingBox.y
|
||||
zoomBox.x,
|
||||
zoomBox.y
|
||||
};
|
||||
FR::defaultRenderer().render(
|
||||
*_fontInfo,
|
||||
glm::vec2(fontResolution().x - zoomBox.boundingBox.x - XSeparation, penPosY),
|
||||
glm::vec2(fontResolution().x - zoomBox.x - XSeparation, penPosY),
|
||||
"Zoom",
|
||||
nav.hasZoomFriction() ? EnabledColor : DisabledColor
|
||||
);
|
||||
penPosY -= zoomBox.boundingBox.y + YSeparation;
|
||||
penPosY -= zoomBox.y + YSeparation;
|
||||
|
||||
FR::BoundingBoxInformation rollBox = FR::defaultRenderer().boundingBox(
|
||||
*_fontInfo,
|
||||
"Roll"
|
||||
);
|
||||
const glm::vec2 rollBox = _fontInfo->boundingBox("Roll");
|
||||
|
||||
_cameraButtonLocations.roll = {
|
||||
fontResolution().x - rollBox.boundingBox.x - XSeparation,
|
||||
fontResolution().x - rollBox.x - XSeparation,
|
||||
fontResolution().y - penPosY,
|
||||
rollBox.boundingBox.x,
|
||||
rollBox.boundingBox.y
|
||||
rollBox.x,
|
||||
rollBox.y
|
||||
};
|
||||
FR::defaultRenderer().render(
|
||||
*_fontInfo,
|
||||
glm::vec2(fontResolution().x - rollBox.boundingBox.x - XSeparation, penPosY),
|
||||
glm::vec2(fontResolution().x - rollBox.x - XSeparation, penPosY),
|
||||
"Roll",
|
||||
nav.hasRollFriction() ? EnabledColor : DisabledColor
|
||||
);
|
||||
@@ -1339,20 +1325,16 @@ void RenderEngine::renderVersionInformation() {
|
||||
}
|
||||
|
||||
using FR = ghoul::fontrendering::FontRenderer;
|
||||
const FR::BoundingBoxInformation versionBox = FR::defaultRenderer().boundingBox(
|
||||
*_fontInfo,
|
||||
versionString
|
||||
);
|
||||
const glm::vec2 versionBox = _fontInfo->boundingBox(versionString);
|
||||
|
||||
const FR::BoundingBoxInformation commitBox = FR::defaultRenderer().boundingBox(
|
||||
*_fontInfo,
|
||||
const glm::vec2 commitBox = _fontInfo->boundingBox(
|
||||
fmt::format("{}@{}", OPENSPACE_GIT_BRANCH, OPENSPACE_GIT_COMMIT)
|
||||
);
|
||||
|
||||
FR::defaultRenderer().render(
|
||||
*_fontInfo,
|
||||
glm::vec2(
|
||||
fontResolution().x - versionBox.boundingBox.x - 10.f,
|
||||
fontResolution().x - versionBox.x - 10.f,
|
||||
5.f
|
||||
),
|
||||
versionString,
|
||||
@@ -1367,10 +1349,7 @@ void RenderEngine::renderVersionInformation() {
|
||||
// checking for that is a bit brittle)
|
||||
FR::defaultRenderer().render(
|
||||
*_fontInfo,
|
||||
glm::vec2(
|
||||
fontResolution().x - commitBox.boundingBox.x - 10.f,
|
||||
versionBox.boundingBox.y + 5.f
|
||||
),
|
||||
glm::vec2(fontResolution().x - commitBox.x - 10.f, versionBox.y + 5.f),
|
||||
OPENSPACE_GIT_FULL,
|
||||
glm::vec4(0.5, 0.5, 0.5, 1.f)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user