I'm making a vector drawing application with OpenGL. Is there a way to implement a clipping mask? Ex: if I have Circle A and Circle B, I only want to see the part of circle B which intersects into Circle A's space. Is there a way to do this that isn't very expensif, I do not want to kill my application. Thanks
A:
Jex,
A quick google search for "clipping mask in openGL" had this as the first result.
Hamy
2010-07-29 16:05:15
What about blend function?
Milo
2010-07-29 16:11:07
Blending is a different operation, but maybe you could find a blending operator and right set of colors to achieve same effect. However, it restricts your possibilities. Stencil buffer is the correct, established way to solve your problem.
ypnos
2010-07-29 16:18:33
+2
A:
One possibility would be to draw Circle A into the stencil buffer, then draw Circle B.
Jerry Coffin
2010-07-29 16:06:58