summaryrefslogtreecommitdiff
path: root/test/testRenderOutput.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-01-10 17:57:20 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-01-10 17:57:20 +0000
commit719c98711d4d816346cdc8f4bc95fc315c2eddc0 (patch)
treeede07bfbe3eb2aab8556e415047ffe9a95150410 /test/testRenderOutput.h
parentFix up all the static analyzer warnings (diff)
downloadilt-719c98711d4d816346cdc8f4bc95fc315c2eddc0.tar.bz2
ilt-719c98711d4d816346cdc8f4bc95fc315c2eddc0.tar.xz
ilt-719c98711d4d816346cdc8f4bc95fc315c2eddc0.zip
Support creating test render output framebuffers of different sizes
Includes a templated subclass to allow size to be specified in a test fixture
Diffstat (limited to 'test/testRenderOutput.h')
-rw-r--r--test/testRenderOutput.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/testRenderOutput.h b/test/testRenderOutput.h
index 0d97ef1..8a8bdaf 100644
--- a/test/testRenderOutput.h
+++ b/test/testRenderOutput.h
@@ -2,12 +2,22 @@
#include "glArrays.h"
#include <glm/vec2.hpp>
+#include <special_members.hpp>
class TestRenderOutput {
public:
- TestRenderOutput();
+ TestRenderOutput(glm::ivec2 size = {640, 480});
+ virtual ~TestRenderOutput() = default;
+
+ NO_MOVE(TestRenderOutput);
+ NO_COPY(TestRenderOutput);
+
const glm::ivec2 size;
glFrameBuffer output;
glRenderBuffer depth;
glTexture outImage;
};
+template<glm::ivec2 Size> class TestRenderOutputSize : public TestRenderOutput {
+public:
+ TestRenderOutputSize() : TestRenderOutput {Size} { }
+};