CFx SDK Documentation  2020SP3
TrGL2LocalRenditionHost.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 // TrGL2 renderer local host
24 
25 #ifndef ODTRGL2LOCALRENDITIONHOST
26 #define ODTRGL2LOCALRENDITIONHOST
27 
28 #include "TD_PackPush.h"
29 
30 #include "TPtr.h"
31 #include "TrVisRendition.h"
32 #include "TrGL2LocalContext.h"
33 
34 // Forward declaration
36 
41 {
42  public:
43  // Returns managed rendition
44  virtual OdTrVisRendition *rendition() = 0;
45  virtual const OdTrVisRendition *rendition() const = 0;
46 
47  // Returns render settings manager
50 
51  // Context data storage management
52  virtual bool hasContextData() const = 0;
53  virtual void processContextData(bool bStore) = 0;
54 
55  // Resource accessors
56  virtual bool getMetafileDef(OdTrVisMetafileId metafileId, OdTrVisMetafileDef &mfDef) const = 0;
57  virtual bool getMaterialDef(OdTrVisMaterialId materialId, OdTrVisMaterialDef &mtDef) const = 0;
58 };
59 
64 {
65  virtual const void *hlBranchGetPtr(OdTrVisHlBranchId hlBranchId) const = 0;
66  virtual bool hlBranchIsEmpty(const void *pHlBranch) const = 0;
67  virtual bool hlBranchHasMarkers(const void *pHlBranch) const = 0;
68  virtual const void *hlBranchGetChild(const void *pHlBranch, OdDbStub *pChildId) const = 0;
69  virtual bool hlBranchHasMarker(const void *pHlBranch, OdTrVisGsMarker gsMarker) const = 0;
70 };
71 
76 
81 {
82  public:
83  // Returns local context
85 
86  // Returns optional highlighting branches interface (if true, rendition will be initialized as Gs-based)
88 
89  // Returns optional resource sharing provider (for multiple devices session sharing)
91 
92  // Predefined textures generation
93  virtual bool generateLinetypeTexture(OdPs::LineType /*ltpId*/, OdUInt8Array& /*outPixels*/, OdUInt8 /*forePixVal*/) const { return false; }
94  virtual bool generateFilltypeTexture(OdPs::FillStyle /*fsId*/, OdUInt8Array& /*outPixels*/, OdUInt32 /*dimX*/, OdUInt32 /*dimY*/, OdUInt8 /*forePixVal*/) const { return false; }
95 };
96 
101 
106 {
107  public:
108  static void addRef(OdTrGL2LocalRenditionHost* pObj) { if (pObj) pObj->rendition()->addRef(); }
109  static void release(OdTrGL2LocalRenditionHost* pObj) { if (pObj) pObj->rendition()->release(); }
110 };
111 
115 class OdTrGL2LocalRenditionHostPtr : public TPtr<OdTrGL2LocalRenditionHost, OdTrGL2LocalRenditionHostTPtrAdaptor>
116 {
117  public:
122  OdTrGL2LocalRenditionHostPtr(const OdTrGL2LocalRenditionHost* pObj, bool bAttach = false)
132  OdUInt32 checkRendererVersion(OdTrVisRenderClient *pRenderClient, OdUInt32 nCheckVersion) const;
133 };
134 
135 #include "TD_PackPop.h"
136 
137 #endif // ODTRGL2LOCALRENDITIONHOST
NULL
#define NULL
Definition: GsProperties.h:177
OdTrGL2LocalRenditionClient::generateFilltypeTexture
virtual bool generateFilltypeTexture(OdPs::FillStyle, OdUInt8Array &, OdUInt32, OdUInt32, OdUInt8) const
Definition: TrGL2LocalRenditionHost.h:94
OdTrGL2LocalRenditionClient
Definition: TrGL2LocalRenditionHost.h:81
OdUInt8
unsigned char OdUInt8
Definition: OdPlatformSettings.h:759
TPtr::operator=
TPtr & operator=(TObj *pObj)
Definition: TPtr.h:103
OdTrGL2LocalRenditionHost::rendition
virtual OdTrVisRendition * rendition()=0
OdTrGL2LocalRenditionHostPtr::OdTrGL2LocalRenditionHostPtr
OdTrGL2LocalRenditionHostPtr(const OdTrGL2LocalRenditionHostPtr &ref)
Definition: TrGL2LocalRenditionHost.h:120
OdRxObject
Definition: RxObject.h:564
OdTrGL2LocalRenditionHost::processContextData
virtual void processContextData(bool bStore)=0
OdTrRndRenderSettingsManager
Definition: TrRndRenderSettings.h:667
OdTrGL2LocalRenditionHostTPtrAdaptor
Definition: TrGL2LocalRenditionHost.h:106
OdTrGL2LocalRenditionHost
Definition: TrGL2LocalRenditionHost.h:41
OdArray< OdUInt8, OdMemoryAllocator< OdUInt8 > >
OdTrGL2LocalRenditionHost::renderSettingsManager
virtual OdTrRndRenderSettingsManager * renderSettingsManager()=0
TD_PackPop.h
OdTrGL2HlBranchClient
Definition: TrGL2LocalRenditionHost.h:64
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdTrGL2LocalRenditionHost::getMaterialDef
virtual bool getMaterialDef(OdTrVisMaterialId materialId, OdTrVisMaterialDef &mtDef) const =0
OdTrGL2LocalRenditionClient::hlBranchClient
virtual OdTrGL2HlBranchClientPtr hlBranchClient()
Definition: TrGL2LocalRenditionHost.h:87
OdTrGL2LocalRenditionHostTPtrAdaptor::addRef
static void addRef(OdTrGL2LocalRenditionHost *pObj)
Definition: TrGL2LocalRenditionHost.h:108
ref
GLenum GLint ref
Definition: gles2_ext.h:262
OdTrGL2LocalRenditionClient::createLocalContext
virtual OdTrGL2LocalContextPtr createLocalContext(OdTrVisRenderClient *pDevice)=0
OdTrGL2LocalRenditionHostPtr
Definition: TrGL2LocalRenditionHost.h:116
OdTrGL2LocalRenditionClient::createSharingProvider
virtual OdTrVisSharingProviderClientPtr createSharingProvider()
Definition: TrGL2LocalRenditionHost.h:90
OdSmartPtr
Definition: SmartPtr.h:58
OdTrGL2LocalRenditionClient::generateLinetypeTexture
virtual bool generateLinetypeTexture(OdPs::LineType, OdUInt8Array &, OdUInt8) const
Definition: TrGL2LocalRenditionHost.h:93
TrVisRendition.h
OdTrGL2LocalRenditionHostTPtrAdaptor::release
static void release(OdTrGL2LocalRenditionHost *pObj)
Definition: TrGL2LocalRenditionHost.h:109
OdTrGL2HlBranchClient::hlBranchGetChild
virtual const void * hlBranchGetChild(const void *pHlBranch, OdDbStub *pChildId) const =0
OdTrGL2HlBranchClient::hlBranchIsEmpty
virtual bool hlBranchIsEmpty(const void *pHlBranch) const =0
OdPs::LineType
LineType
Definition: PlotStyles.h:89
OdTrGL2LocalRenditionHostPtr::create
OdTrGL2LocalRenditionHostPtr & create(OdTrGL2LocalRenditionClient *pClient)
OdTrVisMetafileDef
Definition: TrVisMetafileDef.h:151
OdTrGL2HlBranchClient::hlBranchGetPtr
virtual const void * hlBranchGetPtr(OdTrVisHlBranchId hlBranchId) const =0
OdTrGL2LocalRenditionHost::rendition
virtual const OdTrVisRendition * rendition() const =0
OdTrGL2LocalRenditionHostPtr::release
void release()
Definition: TrGL2LocalRenditionHost.h:130
OdTrGL2LocalRenditionHost::hasContextData
virtual bool hasContextData() const =0
OdTrGL2LocalRenditionClientPtr
OdSmartPtr< OdTrGL2LocalRenditionClient > OdTrGL2LocalRenditionClientPtr
Definition: TrGL2LocalRenditionHost.h:100
TD_PackPush.h
OdTrVisMaterialDef
Definition: TrVisMaterialDef.h:36
OdTrGL2HlBranchClientPtr
OdSmartPtr< OdTrGL2HlBranchClient > OdTrGL2HlBranchClientPtr
Definition: TrGL2LocalRenditionHost.h:75
OdTrGL2LocalRenditionHostPtr::checkRendererVersion
OdUInt32 checkRendererVersion(OdTrVisRenderClient *pRenderClient, OdUInt32 nCheckVersion) const
OdRxObject::release
virtual void release()=0
OdTrVisRenderClient
Definition: TrVisRenderClient.h:40
OdTrGL2LocalRenditionHostPtr::OdTrGL2LocalRenditionHostPtr
OdTrGL2LocalRenditionHostPtr()
Definition: TrGL2LocalRenditionHost.h:118
OdTrVisSharingProviderClientPtr
OdSmartPtr< OdTrVisSharingProviderClient > OdTrVisSharingProviderClientPtr
Definition: TrVisSharingProviderClient.h:45
TPtr
Definition: TPtr.h:76
OdTrVisRendition
Definition: TrVisRendition.h:61
OdTrGL2HlBranchClient::hlBranchHasMarker
virtual bool hlBranchHasMarker(const void *pHlBranch, OdTrVisGsMarker gsMarker) const =0
OdTrGL2LocalRenditionHostPtr::operator=
OdTrGL2LocalRenditionHostPtr & operator=(OdTrGL2LocalRenditionHost *pObj)
Definition: TrGL2LocalRenditionHost.h:125
OdRxObject::addRef
virtual void addRef()=0
OdTrGL2LocalRenditionHost::renderSettingsManager
virtual const OdTrRndRenderSettingsManager * renderSettingsManager() const =0
TPtr.h
OdTrGL2HlBranchClient::hlBranchHasMarkers
virtual bool hlBranchHasMarkers(const void *pHlBranch) const =0
OdPs::FillStyle
FillStyle
Definition: PlotStyles.h:53
OdTrGL2LocalRenditionHostPtr::OdTrGL2LocalRenditionHostPtr
OdTrGL2LocalRenditionHostPtr(const OdTrGL2LocalRenditionHost *pObj, bool bAttach=false)
Definition: TrGL2LocalRenditionHost.h:122
OdTrGL2LocalRenditionHostPtr::OdTrGL2LocalRenditionHostPtr
OdTrGL2LocalRenditionHostPtr(const OdTrVisRendition *pRendition)
TrGL2LocalContext.h
OdTrGL2LocalRenditionHost::getMetafileDef
virtual bool getMetafileDef(OdTrVisMetafileId metafileId, OdTrVisMetafileDef &mfDef) const =0
OdUInt64
Definition: Int64.h:137