[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.
> Quartz does not support XOR drawing.
> For temporary drawing use NSWindow's - cacheImageInRect: and
> - restoreCachedImage
>
> However, I doubt they will work with hardware accelerate OpenGL. Why not
> just draw your temporary selection lines with OpenGL ? You could even use
a
> stencil buffer for overlay effects.