41 mClearColorBuffer(false), mClearDepthBuffer(false), mClearStencilBuffer(false)
43 VL_DEBUG_SET_OBJECT_NAME()
62 Log::error(
"Clear::render(): glClearColorIiEXT and glClearColorIuiEXT not supported.\n");
71 GLboolean scissor_on = glIsEnabled(GL_SCISSOR_TEST);
72 int scissor_box_save[4] = {0,0,-1,-1};
73 glGetIntegerv(GL_SCISSOR_BOX, scissor_box_save);
75 int scissor_box[4] = {0,0,-1,-1};
80 scissor_box[0] = viewport[0];
81 scissor_box[1] = viewport[1];
82 scissor_box[2] = viewport[2];
83 scissor_box[3] = viewport[3];
95 viewport[2] = viewport[0] + viewport[2] -1;
96 viewport[3] = viewport[1] + viewport[3] -1;
98 scissor_box[2] = scissor_box[0] + scissor_box[2] -1;
99 scissor_box[3] = scissor_box[1] + scissor_box[3] -1;
101 if (scissor_box[0] < viewport[0]) scissor_box[0] = viewport[0];
102 if (scissor_box[1] < viewport[1]) scissor_box[1] = viewport[1];
103 if (scissor_box[2] > viewport[2]) scissor_box[2] = viewport[2];
104 if (scissor_box[3] > viewport[3]) scissor_box[3] = viewport[3];
106 if (scissor_box[0] > scissor_box[2])
108 if (scissor_box[1] > scissor_box[3])
111 scissor_box[2] = scissor_box[2] -scissor_box[0] +1;
112 scissor_box[3] = scissor_box[3] -scissor_box[1] +1;
115 glEnable(GL_SCISSOR_TEST);
116 glScissor(scissor_box[0], scissor_box[1], scissor_box[2], scissor_box[3]);
VL_CHECK_OGL()
138 glDisable(GL_SCISSOR_TEST);
139 glScissor(scissor_box_save[0], scissor_box_save[1], scissor_box_save[2], scissor_box_save[3]);
VL_CHECK_OGL()
Associates a Renderable object to an Effect and Transform.
uvec4 mClearColorValueUInt
const T_Scalar & r() const
ivec4 mClearColorValueInt
Represents an OpenGL context, possibly a widget or a pbuffer, which can also respond to keyboard...
static void error(const String &message)
Use this function to provide information about run-time errors: file not found, out of memory...
virtual void render_Implementation(const Actor *, const Shader *, const Camera *, OpenGLContext *) const
Viewport * viewport()
The viewport bound to a camera.
Visualization Library main namespace.
const T_Scalar & g() const
const T_Scalar & b() const
Manages most of the OpenGL rendering states responsible of the final aspect of the rendered objects...
Represents a virtual camera defining, among other things, the point of view from which scenes can be ...
EClearColorMode clearColorMode() const
const T_Scalar & a() const