From: Simon C Mills (simon++at++wgs.estec.esa.nl)
Date: 03/08/2001 00:33:11
Some more on this problem...
I tried the alternative to forcing display list recompilation of
highlighted geometry. That is, disable the use of the compiled display
list during highlighting and re-enable it when highlighting is turned
off. So, this seems to work (on Onyx2 iR and Octane MXE):
//
// Set goeset highlight and enable/disable use of display lists
//
static void
setGSetHlight(pfGeoSet *gset, pfHighlight *hl)
{
// If highlighting disable use of any display lists
if (hl != PFHL_OFF) {
if (gset->getDrawMode(PFGS_COMPILE_GL))
gset->setDrawMode(PFGS_COMPILE_GL, PF_OFF);
}
// Otherwise un-highlighting so enable use of any existing compiled
DL
else {
gset->setDrawMode(PFGS_DRAW_GLOBJ, PF_ON);
// Hope that if there is none this is OK. Does not force a compile
}
gset->setHlight(hl);
}
However I wasn't sure of the exact relationship between modes
PFGS_COMPILE_GL and PFGS_DRAW_GLOBJ. They obviously affect each other.
Also it would seem bad form to set mode PFGS_DRAW_GLOBJ when there isn't
a display list. It works but is this robust?
I use this in a modified version of pfuTravNodeHlight from libpfutil.
This wasn't working with PFHL_FILL mode on iR2 graphics. People must be
highlighting display list optimised geometry on iR graphics so I would
expect this to have been encountered before.
Regards, Simon
_______________________________________________________________________
Simon Mills
Silicon Worlds S.A.
c/o Modelling & Simulation Section (TOS-EMM) Tel: +31 (0)71 565 3725
European Space Agency (ESA/ESTEC) Fax: +31 (0)71 565 5419
Postbus 299, 2200AG Noordwijk e-mail: simon++at++wgs.estec.esa.nl
The Netherlands http://www.estec.esa.nl/wmwww/EMM
_______________________________________________________________________
This archive was generated by hypermail 2b29 : Thu Mar 08 2001 - 00:31:10 PST