32 #ifndef Viewport_INCLUDE_ONCE 33 #define Viewport_INCLUDE_ONCE 57 Viewport(
int x,
int y,
int w,
int h);
59 void activate()
const;
61 bool null() {
return mWidth == 0 || mHeight == 0; }
63 void set(
int x,
int y,
int w,
int h) { mX = x; mY = y; mWidth = w; mHeight = h; }
64 void setX(
int x) { mX = x; }
65 int x()
const {
return mX; }
66 void setY(
int y) { mY = y; }
67 int y()
const {
return mY; }
69 int width()
const {
return mWidth; }
71 int height()
const {
return mHeight; }
87 void setClearColorUInt(
unsigned int r,
unsigned int g,
unsigned int b,
unsigned int a) { mClearColorUInt =
uvec4(r,g,b,a); }
107 bool isPointInside(
int x,
int y,
int framebuffer_height)
const;
void setClearStencil(int stencil)
EClearColorMode mClearColorMode
Vector4< float > fvec4
A 4 components vector with float precision.
The RectI class represents a 2D rectangular area using int precision.
void setClearColor(const fvec4 &color)
void setClearColor(float r, float g, float b, float a)
void setClearColorInt(int r, int g, int b, int a)
void setClearColorInt(const ivec4 &color)
Vector4< unsigned int > uvec4
A 4 components vector with unsigned int precision.
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
Visualization Library main namespace.
void setClearColorUInt(unsigned int r, unsigned int g, unsigned int b, unsigned int a)
Vector2< float > fvec2
A 2 components vector with float precision.
EClearColorMode clearColorMode() const
Vector4< int > ivec4
A 4 components vector with int precision.
The base class for all the reference counted objects.
bool isScissorEnabled() const
const uvec4 & clearColorUInt() const
Implements the viewport and clearing settings associated to a Camera.
void setClearDepth(real depth)
void setClearColorUInt(const uvec4 &color)
void setClearColorMode(EClearColorMode mode)
#define VLGRAPHICS_EXPORT
void setScissorEnabled(bool enable)
If scissor setup is enabled (by default it is), then glScissor is called during activate().
const ivec4 & clearColorInt() const
const fvec4 & clearColor() const
RectI rect() const
Returns the rectangular area that defines the viewport computed as RectI(x(), y(), x()+width()-1, y()+height()-1).
Visualization Library's enums in the 'vl' namespace.
void setHeight(int height)
EClearFlags clearFlags() const
void setClearFlags(EClearFlags clear_flags)
Usually you want to use rather RendererAbstract::setClearFlags()