#include <ApiGraphics/ViewportGL.h>
Public Member Functions | |
ViewportGL (int x, int y, int w, int h) | |
void | getGL () |
void | setGL () const |
ViewportGL | subViewport (int wSub, int hSub) |
ViewportGL | subViewport (int margin, float ratio) |
ViewportGL | subViewport (int margin) |
ViewportGL | subViewport (ViewportGL relativeView) const |
ViewportGL | relativeViewport (ViewportGL view) const |
void | setUnitSquare (ViewportGL subView) const |
void | pushScreenMatrices () const |
void | popScreenMatrices () const |
void | drawScreenQuad (bool filled=true, float z=0) const |
float | ratio () const |
QDomElement | domElement (const QString &name, QDomDocument &document) const |
void | initFromDOMElement (const QDomElement &element) |
Static Public Member Functions | |
static void | pushFrame2D (float xmin, float xmax, float ymin, float ymax) |
static void | popFrame2D () |
static void | push () |
static void | pop () |
Public Attributes | |
int | x |
int | y |
int | w |
int | h |
It allows to easily set or get the current viewport and provides handful methods.