55#ifndef _SO_GL_LAZY_ELEMENT
56#define _SO_GL_LAZY_ELEMENT
92 le->reallySend(state, ALL_MASK);}
97 le->reallySend(state, NO_COLOR_MASK);}
102 le->reallySend(state, DIFFUSE_ONLY_MASK);}
143 if (checkGLFlag || checkIVFlag ||
145 return (fullLazyMatches (checkGLFlag, checkIVFlag, eltInState));
180 {
if (cacheLazyElement->GLSendBits)
181 reallyCopyBackGL(cacheLazyElement->GLSendBits, cacheGLState);}
221 virtual void setTranspTypeElt(
int32_t type);
222 virtual void setPackedElt(
SoNode *node,
225 virtual void setAmbientElt(
const SbColor* color);
226 virtual void setEmissiveElt(
const SbColor* color);
227 virtual void setSpecularElt(
const SbColor* color);
228 virtual void setShininessElt(
float color);
229 virtual void setColorMaterialElt(
bool value);
230 virtual void setBlendingElt(
bool value);
255 static u_char patterns[64+1][32 * 4];
258 static bool patternsCreated;
262 static bool patternListDefined[64+1];
265 static int patternListBase;
268 static int patternListContext;
275 void sendStipple(
const SoState *state,
int transpIndex);
279 static void createPatterns();
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
size_t SbNodeIdType
Type of unique ids of SoNode, used in the notification/change detection handling.
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
#define SO_ELEMENT_HEADER(className)
This one is for non-abstract element classes.
This class is meant to be used by all property nodes that set either a diffuse color or transparency ...
This is the abstract base class for all state elements.
Element that manages the GL state for the SoLazyElement.
static void sendAllMaterial(SoState *state)
Static sends, always send top-of-stack. Intended for extender use.
void reset(SoState *state, uint32_t bitmask) const
Destroy knowledge of GL state.
virtual void push(SoState *state)
Override push() and pop() methods to maintain GL state.
void copyBackGL(SoGLLazyElement *cacheLazyElement, SoGLLazyElement::GLLazyState &cacheGLState)
method that copies GL state back into "this" element after cache has been called.
virtual SoElement * copyMatchInfo() const
Create a copy that we can put in a cache used list and call matches() on later.
static void sendNoMaterial(SoState *state)
SoGLLazyElement * copyLazyMatchInfo(SoState *state)
Replaces copyMatchInfo for this element: makes a GLLazyElement with some initialization.
void updateColorVBO(SoState *state, SoVBO *vbo)
Update the passed VBO with the packed colors if the diffuse/transparency node ids do not match.
virtual void pop(SoState *state, const SoElement *prevTopElement)
static SoGLLazyElement * getInstance(const SoState *state)
Return the top (current) instance of the element in the state Note it does NOT cause cache dependency...
void sendVPPacked(SoState *state, const unsigned char *pcolor)
Send a packed color (not in state).
virtual ~SoGLLazyElement()
Note: destructor is public, so cache can delete its copy.
virtual bool matches(const SoElement *) const
note: matches, copyMatchinfo not used by this element.
virtual void init(SoState *state)
Initializes element.
void send(const SoState *state, uint32_t mask) const
Sends indicated component(s) to GL: Only sends if value is not already in GL.
void sendDiffuseByIndex(int index) const
Send diffuse color and transparency, by index Included for compatibility with SoMaterialBundle To be ...
void mergeCacheInfo(SoGLRenderCache *childCache, SoGLRenderCache *parentCache, uint32_t doSendFlag, uint32_t checkIVFlag, uint32_t checkGLFlag)
static void initClass()
Initializes the SoGLLazyElement class.
bool lazyMatches(uint32_t checkGLFlag, uint32_t checkIVFlag, const SoGLLazyElement *eltInState)
Replace matches() for this element: matches "this" element GL or IV state with values in eltInState.
void getCopyGL(SoGLLazyElement *cacheLazyElement, SoGLLazyElement::GLLazyState &cacheGLState)
method that makes a copy of GL state at cache close().
static void sendOnlyDiffuseColor(SoState *state)
Element that manages several properties such as colors, that need to be lazily tracked by GL.
virtual void registerRedundantSet(SoState *, uint32_t)
method to tell the cache that a redundant set was issued.
static SoLazyElement * getInstance(SoState *state)
Returns the top (current) instance of the element in the state Note that the cache dependencies assoc...
virtual void registerGetDependence(SoState *, uint32_t)
method to register dependence due to get().
uint32_t invalidBits
This is more convenient here, but might logically be kept with SoGLLazyElement.
Multiple-value field containing any number of RGB colors stored as three floats.
Multiple-value field containing any number of floating point values.
Abstract base class for all database nodes.
An SoState collects and holds state while traversing a scene graph.
const SoElement * getConstElement(int stackIndex) const
Returns the top (read-only) instance of the given element stack.
SoVBO is used to manage OpenGL vertex buffer objects.
provide a public typedef for GLLazyState, so that GLRenderCache can use it:
SbNodeIdType GLDiffuseNodeId
SbNodeIdType GLTranspNodeId