12#ifndef FRAMERENDERER_H_6014714286
13#define FRAMERENDERER_H_6014714286
15#include <Carna/Carna.h>
75 const std::unique_ptr< Details > pimpl;
160 void reshape(
unsigned int width,
unsigned int height );
Defines Carna::base::Aggregation.
Defines Carna::base::RenderStageSequence.
Represents an association.
Represents the point-of-view and defines the 3D to 2D projection.
Defines logic for rendering frames from given scenes.
virtual void clearStages() override
Activates glContext and deletes all stages from the rendering stages sequence.
void renderTexture(const RenderTextureParams ¶ms) const
Renders rectangle that covers the current viewport, according to params. Refer to RenderTextureParams...
const math::Statistics< double > & framesPerSecond() const
Tells the average of the reciprocal frame rendering time.
unsigned int height() const
Tells the current frame height. Value is changed through reshape.
unsigned int width() const
Tells the current frame width. Value is changed through reshape.
void setBackgroundColor(const math::Vector4f &)
Sets frame background color. Default value is Color::BLACK_NO_ALPHA.
void render(Camera &cam, Node &root) const
Renders scene root from cam point of view to the currently bound framebuffer by issuing the rendering...
virtual ~FrameRenderer()
Deletes all stages contained by this renderer.
const Viewport & viewport() const
Tells the root viewport that frames are currently rendered with. Value is changed through reshape.
FrameRenderer(GLContext &glContext, unsigned int width, unsigned int height, bool fitSquare)
Instantiates with empty rendering stages sequence.
void reshape(unsigned int width, unsigned int height)
void reshape(unsigned int width, unsigned int height, bool fitSquare)
Sets width, height and root viewport of future rendered frames.
void render(Camera &cam) const
GLContext & glContext() const
Represents the OpenGL context that this renderer is associated with.
Wraps and represents an OpenGL context.
Defines the inner node of a scene graph. Implements a spatial scene element that is allowed to have c...
Represents a rendering stages sequence.
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Defines Carna::base::math namespace and CARNA_FOR_VECTOR3UI.
Eigen::Matrix< float, 4, 1 > Vector4f
Defines vector.
#define NON_COPYABLE
Features class it is placed in as non-copyable.
Specifies how renderTexture is to be performed.
unsigned int unit
The texture unit that renderTexture will instruct the shader to use.
bool useDefaultShader
The currently set shader will be used for drawing if this is false. If the value is true,...
std::string textureUniformName
Holds the name of the uniform variable defined by the shader that will be used, that will be linked w...
float alphaFactor
If useDefaultShader is true, the alpha values sampled from the texture bound to the specified texture...
RenderTextureParams(unsigned int unit)
Instantiates default configuration. This will simply reproduce the texture that is currently bound to...
bool useDefaultSampler
Holds whether a predefined sampler is to be bound to unit before drawing. This predefined sampler use...
Holds mean and variance of an characteristic.