14 #include <Carna/Carna.h>
16 #include <boost/current_function.hpp>
35 const std::unique_ptr< QImage > frame;
36 const std::unique_ptr< base::Texture< 2 > > renderTexture;
37 const std::unique_ptr< base::Framebuffer > fbo;
38 const std::unique_ptr< base::Framebuffer::Binding > fboBinding;
40 void grabFrame()
const;
46 const static double DEFAULT_EPSILON;
48 base::GLContext& glContext;
50 TestFramebuffer( base::GLContext& glContext,
unsigned int width,
unsigned int height );
54 unsigned int width()
const;
56 unsigned int height()
const;
58 void setEpsilon(
double epsilon );
62 void verifyFramebuffer(
const std::string& signature )
const;
64 void verifyFramebuffer
65 (
const std::string& expectedImageFilename
66 ,
const std::string& failureImageOutputFilename )
const;
70 static bool areSimilar(
const QImage&,
const QImage&,
double epsilon );
72 static bool saveActualResult(
const QImage& frame,
const std::string& filename );
82 #define VERIFY_FRAMEBUFFER( testFramebuffer ) \
83 ( testFramebuffer ).verifyFramebuffer( BOOST_CURRENT_FUNCTION );
Defines Carna::base::Framebuffer.
T epsilon()
Defines the maximum difference of two objects treated as equal.