1 #ifndef COIN_SOGLCACHECONTEXTELEMENT_H
2 #define COIN_SOGLCACHECONTEXTELEMENT_H
27 #include <Inventor/elements/SoSubElement.h>
34 typedef void SoScheduleDeleteCB(
void * closure, uint32_t contextid);
38 class COIN_DLL_API SoGLCacheContextElement :
public SoElement {
41 SO_ELEMENT_HEADER(SoGLCacheContextElement);
46 virtual ~SoGLCacheContextElement();
53 static void set(
SoState * state,
int context,
54 SbBool twopasstransparency,
55 SbBool remoterendering);
56 static int get(
SoState * state);
57 static int getExtID(
const char * str);
58 static void getOpenGLVersion(
SoState * state,
int & major,
int & minor);
59 static SbBool extSupported(
SoState * state,
int extid);
60 static SbBool areMipMapsFast(
SoState * state);
65 static void shouldAutoCache(
SoState * state,
int bits);
66 static void setAutoCacheBits(
SoState * state,
int bits);
67 static int resetAutoCacheBits(
SoState * state);
68 static SbBool getIsRemoteRendering(
SoState * state);
70 static uint32_t getUniqueCacheContext(
void);
72 static void scheduleDeleteCallback(
const uint32_t contextid,
73 SoScheduleDeleteCB * cb,
76 static void incNumShapes(
SoState * state);
77 static int getNumShapes(
SoState * state);
78 static void incNumSeparators(
SoState * state);
79 static int getNumSeparators(
SoState * state);
84 static void cleanupContext(uint32_t contextid,
void * closure);
93 enum { RENDERING_UNSET, RENDERING_SET_DIRECT, RENDERING_SET_INDIRECT };
95 SbBool isDirectRendering(
SoState * state)
const;
102 #ifndef COIN_INTERNAL
103 #include <Inventor/elements/SoGLDisplayList.h>
104 #endif // ! COIN_INTERNAL
106 #endif // !COIN_SOGLCACHECONTEXTELEMENT_H