CFx SDK Documentation  2022 SP0
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
#define NULL
Definition: GsProperties.h:177
unsigned int OdUInt32
unsigned char OdUInt8
OdSmartPtr< OdTrGL2LocalRenditionClient > OdTrGL2LocalRenditionClientPtr
OdSmartPtr< OdTrGL2HlBranchClient > OdTrGL2HlBranchClientPtr
OdSmartPtr< OdTrVisSharingProviderClient > OdTrVisSharingProviderClientPtr
virtual void release()=0
virtual void addRef()=0
virtual OdTrGL2HlBranchClientPtr hlBranchClient()
virtual OdTrGL2LocalContextPtr createLocalContext(OdTrVisRenderClient *pDevice)=0
virtual bool generateFilltypeTexture(OdPs::FillStyle, OdUInt8Array &, OdUInt32, OdUInt32, OdUInt8) const
virtual bool generateLinetypeTexture(OdPs::LineType, OdUInt8Array &, OdUInt8) const
virtual OdTrVisSharingProviderClientPtr createSharingProvider()
virtual const OdTrVisRendition * rendition() const =0
virtual bool getMetafileDef(OdTrVisMetafileId metafileId, OdTrVisMetafileDef &mfDef) const =0
virtual bool hasContextData() const =0
virtual OdTrRndRenderSettingsManager * renderSettingsManager()=0
virtual const OdTrRndRenderSettingsManager * renderSettingsManager() const =0
virtual void processContextData(bool bStore)=0
virtual OdTrVisRendition * rendition()=0
virtual bool getMaterialDef(OdTrVisMaterialId materialId, OdTrVisMaterialDef &mtDef) const =0
OdTrGL2LocalRenditionHostPtr(const OdTrGL2LocalRenditionHost *pObj, bool bAttach=false)
OdTrGL2LocalRenditionHostPtr(const OdTrVisRendition *pRendition)
OdUInt32 checkRendererVersion(OdTrVisRenderClient *pRenderClient, OdUInt32 nCheckVersion) const
OdTrGL2LocalRenditionHostPtr(const OdTrGL2LocalRenditionHostPtr &ref)
OdTrGL2LocalRenditionHostPtr & operator=(OdTrGL2LocalRenditionHost *pObj)
OdTrGL2LocalRenditionHostPtr & create(OdTrGL2LocalRenditionClient *pClient)
static void addRef(OdTrGL2LocalRenditionHost *pObj)
static void release(OdTrGL2LocalRenditionHost *pObj)
Definition: TPtr.h:76
TPtr & operator=(TObj *pObj)
Definition: TPtr.h:103
GLenum GLint ref
Definition: gles2_ext.h:262
LineType
Definition: PlotStyles.h:89
FillStyle
Definition: PlotStyles.h:53
virtual bool hlBranchIsEmpty(const void *pHlBranch) const =0
virtual bool hlBranchHasMarker(const void *pHlBranch, OdTrVisGsMarker gsMarker) const =0
virtual const void * hlBranchGetChild(const void *pHlBranch, OdDbStub *pChildId) const =0
virtual bool hlBranchHasMarkers(const void *pHlBranch) const =0
virtual const void * hlBranchGetPtr(OdTrVisHlBranchId hlBranchId) const =0