19#include <boost/current_function.hpp>
38 const std::unique_ptr< QImage > frame;
39 const std::unique_ptr< base::Texture< 2 > > renderTexture;
40 const std::unique_ptr< base::Framebuffer > fbo;
41 const std::unique_ptr< base::Framebuffer::Binding > fboBinding;
43 void grabFrame()
const;
47 const static double DEFAULT_EPSILON;
49 base::GLContext& glContext;
53 std::size_t numIgnore;
55 TestFramebuffer( base::GLContext& glContext,
unsigned int width,
unsigned int height );
59 unsigned int width()
const;
61 unsigned int height()
const;
63 void verifyFramebuffer(
const std::string& signature )
const;
65 void verifyFramebuffer
66 (
const std::string& expectedImageFilename
67 ,
const std::string& failureImageOutputFilename )
const;
71 static bool areSimilar(
const QImage&,
const QImage&,
double epsilon, std::size_t n_ignore = 0 );
73 static bool saveActualResult(
const QImage& frame,
const std::string& filename );
83#define VERIFY_FRAMEBUFFER_EX( testFramebuffer, name ) \
84 ( testFramebuffer ).verifyFramebuffer( name );
86#define VERIFY_FRAMEBUFFER( testFramebuffer ) \
87 VERIFY_FRAMEBUFFER_EX( testFramebuffer, BOOST_CURRENT_FUNCTION );
Defines LibCarna::base::Framebuffer.
Contains forward-declarations.
T epsilon()
Defines the maximum difference of two objects treated as equal.