Added support for drawing of \iclip on visual tools, but no button to invert it yet.

Originally committed to SVN as r2352.
This commit is contained in:
Rodrigo Braz Monteiro 2008-09-14 15:17:14 +00:00
parent 2cb713baef
commit d8c5da67d8
1 changed files with 5 additions and 1 deletions

View File

@ -123,7 +123,6 @@ void VisualToolVectorClip::Draw() {
spline.GetPointList(points,pointCurve);
// Draw stencil mask
// FIXME: This should understand inverse clips too
glEnable(GL_STENCIL_TEST);
glColorMask(0,0,0,0);
glStencilFunc(GL_NEVER,1,1);
@ -136,6 +135,11 @@ void VisualToolVectorClip::Draw() {
glEnd();
}
// Invert stencil
if (inverse) {
DrawRectangle(0,0,sw,sh);
}
// Draw "outside clip" mask
glColorMask(1,1,1,1);
glStencilFunc(GL_EQUAL, 0, 1);