Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
#include <Clear.hpp>

Public Member Functions | |
| virtual const char * | className () |
| Returns the name of the class. | |
| Clear () | |
| virtual void | render (const Actor *, const OpenGLContext *, const Camera *) const |
| Renders the Renderable. | |
| void | setClearColorBuffer (bool clear) |
| void | setClearDepthBuffer (bool clear) |
| void | setClearStencilBuffer (bool clear) |
| void | setClearColorValue (const fvec4 &clear_val) |
| void | setClearColorValueInt (const ivec4 &clear_val) |
| void | setClearColorValueUInt (const uvec4 &clear_val) |
| void | setClearDepthValue (float clear_val) |
| void | setClearStencilValue (int clear_val) |
| void | setClearColorMode (EClearColorMode mode) |
| EClearColorMode | clearColorMode () const |
| void | setScissorBox (int x, int y, int w, int h) |
| Defines which portion of the rendering buffers should be cleared. | |
| void | getScissorBox (int &x, int &y, int &w, int &h) |
Protected Member Functions | |
| virtual void | computeBounds_Implementation () |
Protected Attributes | |
| fvec4 | mClearColorValue |
| ivec4 | mClearColorValueInt |
| uvec4 | mClearColorValueUInt |
| int | mScissorBox [4] |
| EClearColorMode | mClearColorMode |
| float | mClearDepthValue |
| int | mClearStencilValue |
| bool | mClearColorBuffer |
| bool | mClearDepthBuffer |
| bool | mClearStencilBuffer |
The Clear class is a special Renderable that wraps the functionalities of the following OpenGL functions:
Usually the color, depth and stencil buffers are cleared at the beginning of a rendering when the Viewport is initialized. To handle less common cases the Clear class allows you to perform a clear operation also in the middle of a rendering. Just bind it to an an Actor and setup the appropriate clearing options.
| vl::Clear::Clear | ( | ) | [inline] |
| virtual const char* vl::Clear::className | ( | ) | [inline, virtual] |
| virtual void vl::Clear::render | ( | const Actor * | actor, | |
| const OpenGLContext * | , | |||
| const Camera * | camera | |||
| ) | const [inline, virtual] |
| void vl::Clear::setClearColorBuffer | ( | bool | clear | ) | [inline] |
| void vl::Clear::setClearDepthBuffer | ( | bool | clear | ) | [inline] |
| void vl::Clear::setClearStencilBuffer | ( | bool | clear | ) | [inline] |
| void vl::Clear::setClearColorValue | ( | const fvec4 & | clear_val | ) | [inline] |
| void vl::Clear::setClearColorValueInt | ( | const ivec4 & | clear_val | ) | [inline] |
| void vl::Clear::setClearColorValueUInt | ( | const uvec4 & | clear_val | ) | [inline] |
| void vl::Clear::setClearDepthValue | ( | float | clear_val | ) | [inline] |
| void vl::Clear::setClearStencilValue | ( | int | clear_val | ) | [inline] |
| void vl::Clear::setClearColorMode | ( | EClearColorMode | mode | ) | [inline] |
| EClearColorMode vl::Clear::clearColorMode | ( | ) | const [inline] |
| void vl::Clear::setScissorBox | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h | |||
| ) | [inline] |
Defines which portion of the rendering buffers should be cleared.
The parameters 'x', 'y', 'z', 'w' specify a rectangular area in viewport coordinates. Such area is also clipped against the viewport borders. If 'w' or 'h' are set to -1 then the whole viewport is cleared.
| void vl::Clear::getScissorBox | ( | int & | x, | |
| int & | y, | |||
| int & | w, | |||
| int & | h | |||
| ) | [inline] |
| virtual void vl::Clear::computeBounds_Implementation | ( | ) | [inline, protected, virtual] |
Implements vl::Renderable.
fvec4 vl::Clear::mClearColorValue [protected] |
ivec4 vl::Clear::mClearColorValueInt [protected] |
uvec4 vl::Clear::mClearColorValueUInt [protected] |
int vl::Clear::mScissorBox[4] [protected] |
EClearColorMode vl::Clear::mClearColorMode [protected] |
float vl::Clear::mClearDepthValue [protected] |
int vl::Clear::mClearStencilValue [protected] |
bool vl::Clear::mClearColorBuffer [protected] |
bool vl::Clear::mClearDepthBuffer [protected] |
bool vl::Clear::mClearStencilBuffer [protected] |