15#ifndef FRAMERENDERER_H_6014714286
16#define FRAMERENDERER_H_6014714286
78 const std::unique_ptr< Details > pimpl;
163 void reshape(
unsigned int width,
unsigned int height );
Defines LibCarna::base::Aggregation.
Contains forward-declarations.
Defines LibCarna::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.
GLContext & glContext() const
Represents the OpenGL context that this renderer is associated with.
virtual ~FrameRenderer()
Deletes all stages contained by this renderer.
virtual void clearStages() override
Activates glContext and deletes all stages from the rendering stages sequence.
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.
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 renderTexture(const RenderTextureParams ¶ms) const
Renders rectangle that covers the current viewport, according to params. Refer to RenderTextureParams...
void reshape(unsigned int width, unsigned int height, bool fitSquare)
Sets width, height and root viewport of future rendered frames.
const Viewport & viewport() const
Tells the root viewport that frames are currently rendered with. Value is changed through reshape.
const math::Statistics< double > & framesPerSecond() const
Tells the average of the reciprocal frame rendering time.
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...
void render(Camera &cam) const
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 LibCarna::base::math namespace and LIBCARNA_FOR_VECTOR3UI.
Eigen::Matrix< float, 4, 1 > Vector4f
Defines vector.
Defines LibCarna::base::noncopyable and NON_COPYABLE.
#define NON_COPYABLE
Marks the class that it is placed in as non-copyable.
Specifies how renderTexture is to be performed.
float alphaFactor
If useDefaultShader is true, the alpha values sampled from the texture bound to the specified texture...
bool useDefaultShader
The currently set shader will be used for drawing if this is false. If the value is true,...
bool useDefaultSampler
Holds whether a predefined sampler is to be bound to unit before drawing. This predefined sampler use...
RenderTextureParams(unsigned int unit)
Instantiates default configuration. This will simply reproduce the texture that is currently bound to...
std::string textureUniformName
Holds the name of the uniform variable defined by the shader that will be used, that will be linked w...
unsigned int unit
The texture unit that renderTexture will instruct the shader to use.
Holds mean and variance of an characteristic.