24#ifndef _SO_CONTEXTED_OBJECT_CACHE_LIST_H_
25#define _SO_CONTEXTED_OBJECT_CACHE_LIST_H_
102#include <Inventor/SbBasic.h>
103#include <Inventor/helpers/SbGlContextHelper.h>
104#include <Inventor/caches/SoBaseContextCache.h>
113 SoBaseContextedObjectCacheList(
int numCaches = 1,
bool sharable =
true,
SbBool useMutex = FALSE);
126 void *getCache(
SoState *state,
float quality );
129 void setCache(
int sharedGroup,
void *texObj,
130 float quality,
SoState *state = NULL );
132 void setCache(
int sharedGroup,
void *texObj,
133 float quality,
SoState *state,
void*& oldTexObj );
143 void invalidateAll(
SoState *state = NULL )
const;
177 virtual ~SoBaseContextedObjectCacheList();
184 virtual bool notifyDelete()
const;
187 virtual void refObject(
void *obj)
const = 0;
188 virtual void unrefObject(
void *obj)
const = 0;
199 static int s_debugFlag;
202template <
typename TContextedObject>
211 SoContextedObjectCacheList(
int numCaches = 1,
bool sharable =
true,
SbBool useMutex = FALSE)
212 : SoBaseContextedObjectCacheList(numCaches, sharable, useMutex)
223 TContextedObject *getCache(
SoState *state,
float quality )
225 return static_cast<TContextedObject*
>(SoBaseContextedObjectCacheList::getCache(state, quality));
230 return static_cast<TContextedObject*
>(SoBaseContextedObjectCacheList::getCache(ctx, quality));
239 bool getCache(
SoState *state, TContextedObject*& texObj)
245 texObj =
static_cast<TContextedObject*
>(entry->
texObj);
260 void setCache(
int sharedGroup, TContextedObject *texObj,
261 float quality,
SoState *state = NULL )
263 SoBaseContextedObjectCacheList::setCache(sharedGroup, texObj, quality, state);
266 void setCache(
int sharedGroup, TContextedObject *texObj,
267 float quality,
SoState *state, TContextedObject*& oldTexObj )
270 SoBaseContextedObjectCacheList::setCache(sharedGroup, texObj, quality, state, oldObj);
271 oldTexObj =
static_cast<TContextedObject*
>(oldObj);
277 virtual ~SoContextedObjectCacheList() { invalidateAll(); }
279 virtual void refObject(
void *obj)
const
282 static_cast<TContextedObject*
>(obj)->ref();
285 virtual void unrefObject(
void *obj)
const
288 static_cast<TContextedObject*
>(obj)->unref();
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable mutex c...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Shared context m...
Stores info about a tex cache.
SoDeviceContextSharedGroup * contextSharedGroup