CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
25 #ifndef ODTRVECRESOURCESHARINGPROVIDER
26 #define ODTRVECRESOURCESHARINGPROVIDER
32 #include "ExDrawOrderBase.h"
38 class OdTrVecVisualStyleContainer;
39 class OdTrVecLayerContainer;
45 ,
public OdDrawOrderBaseDeviceMCCallback
55 static bool isAttached(
const OdDrawOrderMetafileBase &bitSet,
const OdTrVecDevice *pDevice);
57 static void attach(OdDrawOrderMetafileBase &bitSet,
const OdTrVecDevice *pDevice);
59 static void detach(OdDrawOrderMetafileBase &bitSet,
const OdTrVecDevice *pDevice);
61 static void eliminate(OdDrawOrderMetafileBase &bitSet,
const OdTrVecDevice *pDevice);
64 static void clear(OdDrawOrderMetafileBase &bitSet);
125 OdTrVecDevice *
findUsage(
const OdDrawOrderMetafileBase &bitSet, OdTrVecDevice *pStartFrom =
NULL)
const;
128 virtual bool shareMetafile(OdTrVecDevice *pRequestedFor, OdDrawOrderMetafileBase &bitSet,
132 virtual bool shareTexture(OdTrVecDevice *pRequestedFor, OdDrawOrderMetafileBase &bitSet,
136 virtual bool shareMaterial(OdTrVecDevice *pRequestedFor, OdDrawOrderMetafileBase &bitSet,
140 virtual bool shareMetafile(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom,
143 virtual bool shareTexture(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom,
146 virtual bool shareMaterial(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom,
195 #define OdTrVecResourceDependency_queryX(TypeOf, BaseClass) \
196 OdRxObject *queryX(const OdRxClass* pClass) const \
198 if (pClass == OdTrVecResourceSharingProvider::ResourceDependency::desc()) \
199 return reinterpret_cast<OdRxObject*>((OdTrVecResourceSharingProvider::ResourceDependency*)this); \
200 return BaseClass::queryX(pClass); \
202 TypeOfResource resourceType() const { return TypeOf; }
206 #endif // ODTRVECRESOURCESHARINGPROVIDER
virtual bool shareTexture(OdTrVecDevice *pRequestedFor, OdDrawOrderMetafileBase &bitSet, OdTrVisTextureId textureId, void *pInternalDataPtr, void *pOriginatorPtr)
OdTrVecDevice * findUsage(const OdDrawOrderMetafileBase &bitSet, OdTrVecDevice *pStartFrom=NULL) const
GLuint GLsizei GLsizei GLint GLenum * type
bool internalTextureProc(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom, OdTrVisTextureId textureId, void *pInternalDataPtr, void *pOriginatorPtr, OdTrVisTextureDef &resTexture, bool &bCreated)
void(* broadcastProc)(OdDrawOrderBaseDevice *pDevice, void *pData)
OdTrVecVisualStyleContainer * visualStylesCache(OdTrVecDevice *pDevice)
bool materialTexturesProc(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom, OdTrVisMaterialId materialId, void *pInternalDataPtr, void *pOriginatorPtr)
virtual bool shareTexture(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom, OdTrVisTextureId textureId, void *pInternalDataPtr, void *pOriginatorPtr)
OdTrVecTtfFontsCache * ttfFontsCache(OdTrVecDevice *pDevice)
virtual void openResourceSharing(OdTrVecDevice *pDevice)
static const OdUInt32 g_nBitSys
OdTrVecLayerContainer * m_pLayerCache
OdTrVisRendition * rendition(OdTrVecDevice *pRequestFor) const
void broadcastFunction(const OdDrawOrderMetafileBase &bitSet, broadcastProc pProc, void *pArg) const
virtual bool shareMaterial(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom, OdTrVisMaterialId materialId, void *pInternalDataPtr, void *pOriginatorPtr)
bool isResourceSharingOpened(OdTrVecDevice *pDevice) const
virtual void closeResourceSharing(OdTrVecDevice *pDevice)
static void clear(OdDrawOrderMetafileBase &bitSet)
static const OdUInt32 g_nMaxBit
DeviceEntry(OdTrVecDevice *pDevice)
const OdTrVisRendition::ClientSettings & clientSettings(const OdTrVecDevice *pRequestFor) const
OdTrVecResourceSharingProvider()
virtual bool shareMaterial(OdTrVecDevice *pRequestedFor, OdDrawOrderMetafileBase &bitSet, OdTrVisMaterialId materialId, void *pInternalDataPtr, void *pOriginatorPtr)
static void detach(OdDrawOrderMetafileBase &bitSet, const OdTrVecDevice *pDevice)
void shareIdRegistration(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom, OdTrVisId id, OdInt32 type)
static OdSmartPtr< OdTrVecResourceSharingProvider > createObject()
OdArray< DeviceEntry > m_rmDevices
~OdTrVecResourceSharingProvider()
ODRX_USING_HEAP_OPERATORS(OdTrVisSharingProviderClient)
OdTrVecDevice * m_pDevice
static void attach(OdDrawOrderMetafileBase &bitSet, const OdTrVecDevice *pDevice)
OdTrVecTtfFontsCache * m_pTtfCache
OdTrVecVisualStyleContainer * m_pVSCache
OdSmartPtr< OdTrVecResourceSharingProvider > OdTrVecResourceSharingProviderPtr
bool hasSharedResources() const
OdUInt32 m_nSharedDevices
static void eliminate(OdDrawOrderMetafileBase &bitSet, const OdTrVecDevice *pDevice)
virtual bool shareMetafile(OdTrVecDevice *pRequestedFor, OdDrawOrderMetafileBase &bitSet, OdTrVisMetafileId metafileId, void *pInternalDataPtr, void *pOriginatorPtr)
OdGsDevice * gsDevice(OdTrVecDevice *pRequestFor) const
virtual TypeOfResource resourceType() const =0
virtual OdDrawOrderMetafileBase & resourceBitSet()=0
virtual void onDeleteRequest(onDeleteRequestProc pReqProc, void *pData)
OdTrVecLayerContainer * layersCache(OdTrVecDevice *pDevice)
OdTrVisRenderClient * renderClient(OdTrVecDevice *pRequestFor) const
static bool isAttached(const OdDrawOrderMetafileBase &bitSet, const OdTrVecDevice *pDevice)
virtual OdTrVisId resourceId() const =0
static OdRxClass * desc()
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)
void broadcastFunctionForAll(broadcastProc pProc, void *pArg, const OdTrVecDevice *pExclusion=NULL) const
static void compress(OdDrawOrderMetafileBase &bitSet, OdUInt32 nBit)
virtual bool shareMetafile(OdTrVecDevice *pRequestedFor, OdTrVecDevice *pRequestedFrom, OdTrVisMetafileId metafileId, void *pInternalDataPtr, void *pOriginatorPtr)