mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-07 21:08:33 -06:00
- Add currentDrawBufferResolution method in WindowWrapper
- Base renderer resolution on draw buffer resolution instead of window res - Obtain number of aa samples from config file, instead of hard coding to eight samples
This commit is contained in:
@@ -45,7 +45,9 @@ public:
|
||||
uint32_t mouseButtons(int maxNumber) const override;
|
||||
glm::ivec2 currentWindowSize() const override;
|
||||
glm::ivec2 currentWindowResolution() const override;
|
||||
|
||||
glm::ivec2 currentDrawBufferResolution() const override;
|
||||
int currentNumberOfAaSamples() const override;
|
||||
|
||||
bool isRegularRendering() const override;
|
||||
|
||||
glm::mat4 viewProjectionMatrix() const override;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#define __WINDOWWRAPPER_H__
|
||||
|
||||
#include <ghoul/glm.h>
|
||||
#include <ghoul/misc/exception.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
@@ -104,6 +105,18 @@ public:
|
||||
virtual glm::ivec2 currentWindowResolution() const;
|
||||
|
||||
/**
|
||||
* Returns the resolution of the currently active framebuffer in pixel coordinates.
|
||||
* On default, this method returns the same size as #currentWindowSize.
|
||||
* \return The resolution of the currently active window in pixel coordinates
|
||||
*/
|
||||
virtual glm::ivec2 currentDrawBufferResolution() const;
|
||||
|
||||
/**
|
||||
* Returns the number of anti-aliasing samples used in the current window.
|
||||
*/
|
||||
virtual int currentNumberOfAaSamples() const;
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if the current rendering method is regular, i.e., it is
|
||||
* a flat projection without non-linear distortions. Returns <code>false</code> in
|
||||
* other cases, for example fisheye projections. On default, this method will return
|
||||
@@ -163,6 +176,10 @@ public:
|
||||
* Advises the windowing system to take a screenshot. This method defaults to a no-op.
|
||||
*/
|
||||
virtual void takeScreenshot() const;
|
||||
|
||||
struct WindowWrapperException : public ghoul::RuntimeError {
|
||||
explicit WindowWrapperException(const std::string& msg);
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -104,6 +104,7 @@ private:
|
||||
GLuint _fragmentBuffer;
|
||||
GLuint _fragmentTexture;
|
||||
GLuint _vertexPositionBuffer;
|
||||
int _nAaSamples;
|
||||
|
||||
ghoul::Dictionary _rendererData;
|
||||
}; // ABufferRenderer
|
||||
|
||||
Reference in New Issue
Block a user