[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XOR drawing in Cocoa



>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