mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-05 02:20:11 -05:00
Remove DummyWindowWrapper and implement default methods into WindowWrapper
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2015 *
|
||||
* *
|
||||
* 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 <openspace/engine/wrapper/dummywindowwrapper.h>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
void DummyWindowWrapper::clearAllWindows(const glm::vec4&) {}
|
||||
|
||||
bool DummyWindowWrapper::windowHasResized() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
double DummyWindowWrapper::averageDeltaTime() const {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
glm::vec2 DummyWindowWrapper::mousePosition() const {
|
||||
return glm::vec2(0.f);
|
||||
}
|
||||
|
||||
uint32_t DummyWindowWrapper::mouseButtons(int maxNumber) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
glm::ivec2 DummyWindowWrapper::currentWindowSize() const {
|
||||
return glm::ivec2(0);
|
||||
}
|
||||
|
||||
glm::mat4 DummyWindowWrapper::viewProjectionMatrix() const {
|
||||
return glm::mat4(1.f);
|
||||
}
|
||||
|
||||
void DummyWindowWrapper::setNearFarClippingPlane(float near, float far) {}
|
||||
|
||||
void DummyWindowWrapper::takeScreenshot() const {}
|
||||
|
||||
} // namespace openspace
|
||||
@@ -26,14 +26,44 @@
|
||||
|
||||
namespace openspace {
|
||||
|
||||
void WindowWrapper::setBarrier(bool) {}
|
||||
|
||||
void WindowWrapper::clearAllWindows(const glm::vec4& clearColor) {}
|
||||
|
||||
bool WindowWrapper::windowHasResized() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
double WindowWrapper::averageDeltaTime() const {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
glm::vec2 WindowWrapper::mousePosition() const {
|
||||
return glm::vec2(0.f);
|
||||
}
|
||||
|
||||
uint32_t WindowWrapper::mouseButtons(int maxNumber) const {
|
||||
return uint32_t(0);
|
||||
}
|
||||
|
||||
glm::ivec2 WindowWrapper::currentWindowSize() const {
|
||||
return glm::ivec2(0);
|
||||
}
|
||||
|
||||
glm::ivec2 WindowWrapper::currentWindowResolution() const {
|
||||
return currentWindowSize();
|
||||
}
|
||||
|
||||
|
||||
bool WindowWrapper::isRegularRendering() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
glm::mat4 WindowWrapper::viewProjectionMatrix() const {
|
||||
return glm::mat4(1.f);
|
||||
}
|
||||
|
||||
void WindowWrapper::setNearFarClippingPlane(float near, float far) {}
|
||||
|
||||
glm::ivec4 WindowWrapper::viewportPixelCoordinates() const {
|
||||
return glm::ivec4(
|
||||
0,
|
||||
@@ -43,7 +73,6 @@ glm::ivec4 WindowWrapper::viewportPixelCoordinates() const {
|
||||
);
|
||||
}
|
||||
|
||||
void WindowWrapper::setBarrier(bool) {}
|
||||
|
||||
bool WindowWrapper::isExternalControlConnected() const {
|
||||
return false;
|
||||
@@ -56,4 +85,6 @@ bool WindowWrapper::isSimpleRendering() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void WindowWrapper::takeScreenshot() const {}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
Reference in New Issue
Block a user