mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-04 01:39:47 -05:00
Merge branch 'develop' into feature/globebrowsing
This commit is contained in:
@@ -42,7 +42,8 @@ Documentation ConfigurationManager::Documentation() {
|
||||
{
|
||||
ConfigurationManager::KeyConfigScene,
|
||||
new StringAnnotationVerifier(
|
||||
"A valid scene file as described in the Scene documentation"),
|
||||
"A valid scene file as described in the Scene documentation"
|
||||
),
|
||||
"The scene description that is used to populate the application after "
|
||||
"startup. The scene determines which objects are loaded, the startup "
|
||||
"time and other scene-specific settings. More information is provided in "
|
||||
@@ -50,9 +51,7 @@ Documentation ConfigurationManager::Documentation() {
|
||||
},
|
||||
{
|
||||
ConfigurationManager::KeyPaths,
|
||||
new TableVerifier({
|
||||
{ "*", new StringVerifier }
|
||||
}),
|
||||
new StringListVerifier,
|
||||
"A list of paths that are automatically registered with the file system. "
|
||||
"If a key X is used in the table, it is then useable by referencing ${X} "
|
||||
"in all other configuration files or scripts.",
|
||||
@@ -60,9 +59,7 @@ Documentation ConfigurationManager::Documentation() {
|
||||
},
|
||||
{
|
||||
ConfigurationManager::KeyFonts,
|
||||
new TableVerifier({
|
||||
{ "*", new StringVerifier, "Font paths loadable by FreeType" }
|
||||
}),
|
||||
new StringListVerifier("Font paths loadable by FreeType"),
|
||||
"A list of all fonts that will automatically be loaded on startup. Each "
|
||||
"key-value pair contained in the table will become the name and the file "
|
||||
"for a font.",
|
||||
@@ -75,7 +72,7 @@ Documentation ConfigurationManager::Documentation() {
|
||||
ConfigurationManager::PartLogLevel,
|
||||
new StringInListVerifier(
|
||||
// List from logmanager.cpp::levelFromString
|
||||
{"Debug", "Info", "Warning", "Error", "Fatal", "None" }
|
||||
{ "Debug", "Info", "Warning", "Error", "Fatal", "None" }
|
||||
),
|
||||
"The severity of log messages that will be displayed. Only "
|
||||
"messages of the selected level or higher will be displayed. All "
|
||||
@@ -303,17 +300,15 @@ Documentation ConfigurationManager::Documentation() {
|
||||
}),
|
||||
"The method for scaling the onscreen text in the window. As the resolution "
|
||||
"of the rendering can be different from the size of the window, the onscreen "
|
||||
"text can either be scaled according to the window size (\"window\"), or the "
|
||||
"rendering resolution (\"framebuffer\"). This value defaults to \"window\".",
|
||||
"text can either be scaled according to the window size ('window'), or the "
|
||||
"rendering resolution ('framebuffer'). This value defaults to 'window'.",
|
||||
Optional::Yes
|
||||
},
|
||||
{
|
||||
ConfigurationManager::KeyDownloadRequestURL,
|
||||
new OrVerifier(
|
||||
new StringVerifier,
|
||||
new TableVerifier({
|
||||
{ "*", new StringVerifier }
|
||||
})
|
||||
new StringListVerifier
|
||||
),
|
||||
"The URL from which files will be downloaded by the Launcher. This can "
|
||||
"either be a single URL or a list of possible URLs from which the "
|
||||
|
||||
@@ -898,21 +898,13 @@ void OpenSpaceEngine::postSynchronizationPreDraw() {
|
||||
glm::ivec2 windowSize = _windowWrapper->currentWindowSize();
|
||||
glm::ivec2 renderingSize = _windowWrapper->currentWindowResolution();
|
||||
uint32_t mouseButtons = _windowWrapper->mouseButtons(2);
|
||||
|
||||
//glm::vec2 windowBufferCorrectionFactor = glm::vec2(
|
||||
// static_cast<float>(drawBufferResolution.x) / static_cast<float>(windowSize.x),
|
||||
// static_cast<float>(drawBufferResolution.y) / static_cast<float>(windowSize.y)
|
||||
//);
|
||||
|
||||
//LINFO("DrawBufferResolution: " << std::to_string(drawBufferResolution));
|
||||
//LINFO("Window Size: " << std::to_string(windowSize));
|
||||
|
||||
double dt = _windowWrapper->averageDeltaTime();
|
||||
|
||||
_gui->startFrame(
|
||||
static_cast<float>(dt),
|
||||
glm::vec2(windowSize),
|
||||
glm::vec2(renderingSize),
|
||||
_windowWrapper->dpiScaling(),
|
||||
mousePosition,
|
||||
mouseButtons
|
||||
);
|
||||
|
||||
@@ -90,19 +90,27 @@ uint32_t SGCTWindowWrapper::mouseButtons(int maxNumber) const {
|
||||
}
|
||||
|
||||
glm::ivec2 SGCTWindowWrapper::currentWindowSize() const {
|
||||
//return glm::ivec2(sgct::Engine::instance()->getCurrentWindowPtr()->getXResolution(),
|
||||
// sgct::Engine::instance()->getCurrentWindowPtr()->getYResolution());
|
||||
|
||||
return glm::ivec2(sgct::Engine::instance()->getCurrentWindowPtr()->getXResolution(),
|
||||
sgct::Engine::instance()->getCurrentWindowPtr()->getYResolution());
|
||||
auto window = sgct::Engine::instance()->getCurrentWindowPtr();
|
||||
switch (window->getStereoMode()) {
|
||||
case sgct::SGCTWindow::Side_By_Side_Stereo:
|
||||
case sgct::SGCTWindow::Side_By_Side_Inverted_Stereo:
|
||||
return glm::ivec2(
|
||||
window->getXResolution() / 2,
|
||||
window->getYResolution());
|
||||
case sgct::SGCTWindow::Top_Bottom_Stereo:
|
||||
case sgct::SGCTWindow::Top_Bottom_Inverted_Stereo:
|
||||
return glm::ivec2(
|
||||
window->getXResolution(),
|
||||
window->getYResolution() / 2);
|
||||
default:
|
||||
return glm::ivec2(
|
||||
window->getXResolution(),
|
||||
window->getYResolution());
|
||||
}
|
||||
}
|
||||
|
||||
glm::ivec2 SGCTWindowWrapper::currentWindowResolution() const {
|
||||
//int width, height;
|
||||
//auto window = sgct::Engine::instance()->getCurrentWindowPtr()->getWindowHandle();
|
||||
//glfwGetFramebufferSize(window, &width, &height);
|
||||
//return glm::ivec2(width, height);
|
||||
|
||||
auto window = sgct::Engine::instance()->getCurrentWindowPtr();
|
||||
int x, y;
|
||||
sgct::Engine::instance()->getCurrentWindowPtr()->getFinalFBODimensions(x, y);
|
||||
return glm::ivec2(x, y);
|
||||
@@ -120,6 +128,13 @@ glm::ivec2 SGCTWindowWrapper::currentDrawBufferResolution() const {
|
||||
}
|
||||
throw WindowWrapperException("No viewport available");
|
||||
}
|
||||
|
||||
glm::vec2 SGCTWindowWrapper::dpiScaling() const {
|
||||
return glm::vec2(
|
||||
sgct::Engine::instance()->getCurrentWindowPtr()->getXScale(),
|
||||
sgct::Engine::instance()->getCurrentWindowPtr()->getYScale()
|
||||
);
|
||||
}
|
||||
|
||||
int SGCTWindowWrapper::currentNumberOfAaSamples() const {
|
||||
return sgct::Engine::instance()->getCurrentWindowPtr()->getNumberOfAASamples();
|
||||
|
||||
@@ -108,6 +108,10 @@ glm::ivec2 WindowWrapper::currentWindowResolution() const {
|
||||
glm::ivec2 WindowWrapper::currentDrawBufferResolution() const {
|
||||
return currentWindowSize();
|
||||
}
|
||||
|
||||
glm::vec2 WindowWrapper::dpiScaling() const {
|
||||
return glm::vec2(1.f);
|
||||
}
|
||||
|
||||
int WindowWrapper::currentNumberOfAaSamples() const {
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user