[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
XOR drawing in Cocoa
- Subject: XOR drawing in Cocoa
- From: matteo.rossi at libero.it (Matteo Rossi)
- Date: Mon Mar 4 09:05:59 2002
- References: <200203040605.g2465fx09729@lists.omnigroup.com>
>I can draw the temporary graphics in OpenGL, but I don't know how to update
>them without redrawing the entire scene. For a large model, this can be
>farily slow.
>What I am looking for is a way to display some temporary graphics (e.g. a
>selection rectangle) over the OpenGL view without having to redraw the
>entire OpenGL scene on every mouse move.
>I am already using the stencil buffer for computing shadows.
Perhaps I'm missing something, but to draw a selection rectangle in my
NSOpenGLView I use openGL XOR:
glEnable(GL_COLOR_LOGIC_OP);
glLogicOp(GL_XOR);
...it works correctly.
Matteo Rossi