Does anyone know of a way to control the display (view) while drawing with the mdlWindow_(element)Draw routines. I am able to draw in the view utilizing these routines, but of course, when the cursor is moved, the dynamic update of the view destroys what I have drawn. Using these routines to drawn geometry is only meant to be temporary, but I would like to control when the drawn elements are destroyed in the view. I have utilized the Transient routines to draw this geometry, but given the amount of items I need to draw to the screen, these routines involve way too much overhead, and are very slow. I realize the mdlWindow_(element)Draw routines are probably not designed to perform in this manner, but I was just curious if there is some view control I am missing, which would allow me to control these temporary view elements. Have tried binding the drawing routines to view functions, but the result is an annoying flicker in the display. Any help would be appreciated.
Larry Durke said:I have utilized the Transient routines to draw this geometry
Transients are the way to go. I don't see why 'these routines involve way too much overhead': you create an element and add it to the transient descriptor chain.
If performance concerns you when adding many elements, then defer display until you've finished adding elements:
const int DeferDisplay = 0;
pTransients = mdlTransient_addElemDescr (..., ..., DeferDisplay);
Regards, Jon Summers LA Solutions
Answer Verified By: Larry Durke