Gui: add support of selection context
The patch implements context-aware selection and rendering in 3D view. Please check [here](https://git.io/fjiY5) for more details, including the following 'Render Caching' section. The patch also includes modification of View3DInventorViewer to support always-on-top selection rendering using the secondary selection context and the new coin node SoFCPathAnnotation. Another small change in SoQtQuarterAdaptor for more responsive frame rate display. The original implementation reports skewed frame rate in the presence of long idle period.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <Inventor/elements/SoOverrideElement.h>
|
||||
#include "SoFCInteractiveElement.h"
|
||||
|
||||
using namespace Gui;
|
||||
@@ -248,6 +249,16 @@ void SoGLVBOActivatedElement::get(SoState * state, SbBool& active)
|
||||
const SoGLVBOActivatedElement* self = static_cast<const SoGLVBOActivatedElement *>
|
||||
(SoElement::getConstElement(state, classStackIndex));
|
||||
active = self->active;
|
||||
if(active) {
|
||||
uint32_t flags = SoOverrideElement::getFlags(state);
|
||||
if(flags & (SoOverrideElement::COLOR_INDEX|
|
||||
SoOverrideElement::DIFFUSE_COLOR|
|
||||
SoOverrideElement::MATERIAL_BINDING|
|
||||
SoOverrideElement::TRANSPARENCY|
|
||||
SoOverrideElement::NORMAL_VECTOR|
|
||||
SoOverrideElement::NORMAL_BINDING))
|
||||
active = false;
|
||||
}
|
||||
}
|
||||
|
||||
void SoGLVBOActivatedElement::push(SoState * state)
|
||||
|
||||
Reference in New Issue
Block a user