12#ifndef VIEWPORT_H_6014714286
13#define VIEWPORT_H_6014714286
15#include <Carna/Carna.h>
54 const std::unique_ptr< Details > pimpl;
Represents an association.
Maintains a framebuffer object that supports up to 8 color components simultaneously.
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
unsigned int marginTop() const
Tells viewport's top margin.
Viewport(const Framebuffer &)
void setHeight(unsigned int)
Sets viewport height.
void setMarginLeft(unsigned int)
Sets viewport left margin.
void done() const
Restores the previous viewport.
unsigned int marginRight() const
Tells viewport's right margin.
unsigned int parentHeight() const
Tells parent viewport's height.
void setWidth(unsigned int)
Sets viewport width.
bool isActive() const
Tells whether this viewport is currently active.
unsigned int marginLeft() const
Tells viewport's left margin.
void setMarginTop(unsigned int)
Sets viewport top margin.
unsigned int height() const
Tells viewport height.
Viewport(unsigned int rootWidth, unsigned int rootHeight, bool fitSquare)
Creates root viewport.
unsigned int parentWidth() const
Tells parent viewport's width.
void makeActive() const
Makes this viewport the active one of the current OpenGL context.
unsigned int width() const
Tells viewport width.
unsigned int marginBottom() const
Tells viewport's bottom margin.
~Viewport()
Restores the parent viewport if this viewport is still active.
Viewport(const Viewport &parent, unsigned int left, unsigned int top, unsigned int width, unsigned int height)
Derives viewport from parent.
#define NON_COPYABLE
Features class it is placed in as non-copyable.