mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-08 04:20:14 -05:00
Merge branch 'feature/retina' into feature/globebrowsing
This commit is contained in:
@@ -72,6 +72,8 @@ const string ConfigurationManager::KeyDisableMasterRendering = "DisableRendering
|
||||
const string ConfigurationManager::KeyDownloadRequestURL = "DownloadRequestURL";
|
||||
const string ConfigurationManager::KeyRenderingMethod = "RenderingMethod";
|
||||
|
||||
const string ConfigurationManager::KeyOnScreenTextScaling = "OnScreenTextScaling";
|
||||
|
||||
const string ConfigurationManager::KeyHttpProxy = "HttpProxy";
|
||||
const string ConfigurationManager::PartHttpProxyAddress = "Address";
|
||||
const string ConfigurationManager::PartHttpProxyPort = "Port";
|
||||
|
||||
@@ -295,6 +295,18 @@ Documentation ConfigurationManager::Documentation() {
|
||||
"shutdown is aborted.",
|
||||
Optional::Yes
|
||||
},
|
||||
{
|
||||
ConfigurationManager::KeyOnScreenTextScaling,
|
||||
new StringInListVerifier({
|
||||
// Values from RenderEngine:updateRenderer
|
||||
"window", "framebuffer"
|
||||
}),
|
||||
"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\".",
|
||||
Optional::Yes
|
||||
},
|
||||
{
|
||||
ConfigurationManager::KeyDownloadRequestURL,
|
||||
new OrVerifier(
|
||||
|
||||
@@ -744,7 +744,7 @@ void OpenSpaceEngine::loadFonts() {
|
||||
LERROR("Error initializing default font renderer");
|
||||
|
||||
ghoul::fontrendering::FontRenderer::defaultRenderer().setFramebufferSize(
|
||||
glm::vec2(_windowWrapper->currentWindowSize())
|
||||
_renderEngine->fontResolution()
|
||||
);
|
||||
|
||||
}
|
||||
@@ -896,6 +896,7 @@ void OpenSpaceEngine::postSynchronizationPreDraw() {
|
||||
glm::vec2 mousePosition = _windowWrapper->mousePosition();
|
||||
//glm::ivec2 drawBufferResolution = _windowWrapper->currentDrawBufferResolution();
|
||||
glm::ivec2 windowSize = _windowWrapper->currentWindowSize();
|
||||
glm::ivec2 renderingSize = _windowWrapper->currentWindowResolution();
|
||||
uint32_t mouseButtons = _windowWrapper->mouseButtons(2);
|
||||
|
||||
//glm::vec2 windowBufferCorrectionFactor = glm::vec2(
|
||||
@@ -911,7 +912,7 @@ void OpenSpaceEngine::postSynchronizationPreDraw() {
|
||||
_gui->startFrame(
|
||||
static_cast<float>(dt),
|
||||
glm::vec2(windowSize),
|
||||
glm::vec2(1.f),
|
||||
glm::vec2(renderingSize),
|
||||
mousePosition,
|
||||
mouseButtons
|
||||
);
|
||||
|
||||
@@ -90,12 +90,20 @@ 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());
|
||||
}
|
||||
|
||||
glm::ivec2 SGCTWindowWrapper::currentWindowResolution() const {
|
||||
int x,y;
|
||||
//int width, height;
|
||||
//auto window = sgct::Engine::instance()->getCurrentWindowPtr()->getWindowHandle();
|
||||
//glfwGetFramebufferSize(window, &width, &height);
|
||||
//return glm::ivec2(width, height);
|
||||
|
||||
int x, y;
|
||||
sgct::Engine::instance()->getCurrentWindowPtr()->getFinalFBODimensions(x, y);
|
||||
return glm::ivec2(x, y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user