CFx SDK Documentation  2023 SP0
TrVisRendition.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 // GLES2 device base rendition interface
24 
25 #ifndef ODTRVISRENDITION
26 #define ODTRVISRENDITION
27 
28 #include "TD_PackPush.h"
29 
30 #include "TrVisDefs.h"
31 #include "TrVisInfoString.h"
33 #include "TrVisSurfaceDef.h"
34 #include "TrVisViewportDef.h"
35 #include "TrVisMetafileDef.h"
36 #include "TrVisTextureDef.h"
37 #include "TrVisMaterialDef.h"
38 #include "TrVisLightDef.h"
39 #include "TrVisExtentsDef.h"
40 #include "TrVisHlBranchDef.h"
41 #include "TrVisVisualStyle.h"
42 #include "TrVisLayerDef.h"
43 
44 #include "Ge/GeExtents3d.h"
45 #include "Gs/GsDCRectArray.h"
46 #include "StaticRxObject.h"
47 #include "ThreadsCounter.h"
48 
50 
51 class OdTrVisUniqueID;
52 class OdGiDrawable;
53 
54 class OdGsFiler;
55 class OdTrVisIdMap;
56 
61 {
62  public:
63  // Viewport data fields
65  {
66  // Viewport visibility flag
68  // Transform matrices, camera positioning
70  // Persistent viewport parameters, flags and etc.
72  // Contextual viewport parameters (lineweight style, fading, etc.)
74  // Viewport rectangle in screen coordinates
76  // Viewport Nrc clipping boundary in screen coordinates
78  // Array of lineweights
80  // Base shader program
82  // Viewport border in screen coordinates
84 
86  };
87  // Core rendition data types
88  enum DataType
89  {
100 
102  };
103  // Mt handling types
105  {
106  kMtSkip = 0, // Skip data
107  kMtRedirect, // Redirect data without handling
108  kMtGlobal, // Redirect under global mutex
109  kMtCompete, // Redirect under specified mutex
110  kMtRecord // Record till completion (placed under own recorder mutex)
111  };
112  // Special DisplayId codes, provide fast access to renderer functionality directly from display list
114  {
115  kDisplayCodeZero = 0, // Empty display code
116  kDisplayCodeHighlight = 1, // Execute highlighting procedure
117  kDisplayCodeUnhighlight = 2, // Execute unhighlighting procedure
118  kDisplayCodePushMatrix = 3, // Execute push transformation matrix procedure
119  kDisplayCodePopMatrix = 4, // Execute pop transformation matrix procedure
120  kDisplayCodeSelMarkers = 5, // Setup selection markers
121 
122  kDisplayCodeRange = 0x10 // We reserve first 16 codes for special procedures
123  };
124  // Rendition flags
126  {
127  kSupportPartialUpdate = (1 << 0), // isSupportPartialUpdate
128  kSupportSnapshotQueries = (1 << 1), // isSupportSnapshotQueries
129  kSupportCompositeMetafiles = (1 << 2), // isSupportCompositeMetafiles
130  kSupportVisualStyles = (1 << 3), // isSupportVisualStyles
131  kSupportGsStateSaving = (1 << 4), // isSupportGsStateSaving
132  kSupportOverlayBuffers = (1 << 5), // isSupportOverlayBuffers
133  kUpdateClientSectionOnly = (1 << 6), // updateClientDependentSectionOnly
134  kUpdateShareableSectionOnly = (1 << 7) // updateShareableSectionOnly
135  };
136  public:
138  {
139  // Register persistent resource
140  virtual void reg(DataType type, OdTrVisId id, OdDbStub *pPersId) = 0;
141  // Register transient resource
142  virtual void reg(DataType type, OdTrVisId id, const OdGiDrawable *pTransId) = 0;
143  // Register persistent or transient resource
144  void reg(DataType type, OdTrVisId id, OdDbStub *pPersId, const void *pTransId)
145  { if (pPersId) reg(type, id, pPersId); else reg(type, id, reinterpret_cast<const OdGiDrawable*>(pTransId)); }
146  // Copy resource registration
147  virtual void reg(DataType type, OdTrVisId id, const OdTrVisUniqueID &uId) = 0;
148  // Remove resource registration
149  virtual void kill(DataType type, OdTrVisId id) = 0;
150  // Access resource registration
151  virtual OdTrVisUniqueID *get(DataType type, OdTrVisId id, bool bKill = false) const = 0;
152  };
153  public:
154  // Client information
155  struct ClientInfo
156  {
157  OdTrVisInfoString m_glVendor; // OpenGL vendor
158  OdTrVisInfoString m_glRenderer; // OpenGL renderer name
159  OdTrVisInfoString m_glVersion; // OpenGL version
161  OdTrVisInfoString m_glExtensions; // List of extensions
162  };
163  // Client settings
165  {
166  bool m_bObtained; // True if settings obtained from client.
167  // Client information
169  // Flags
170  enum Flags
171  {
172  // Texture settings
173  kNonPow2Textures = (1 << 0), // True if support non power of two textures.
174  kNonPow2Wrapping = (1 << 1), // True if support all non power of two textures wrapping modes.
175  kSupportsBGR = (1 << 2), // True if support BGR textures format.
176  kSupportsBGRA = (1 << 3), // True if support BGRA textures format.
177  kRequireBGR = (1 << 4), // True if support only BGR/BGRA textures format.
178  kOverrideLut = (1 << 5), // True if client override Lut device settings.
179  kLutMonochrome = (1 << 6), // True if client prefer Lut monochrome textures.
180  kLutPalette = (1 << 7), // True if client prefer Lut 4-8bpp textures.
181  // Performance/quality degradation
182  kShadeByVertex = (1 << 8) // Mobile devices could have serious performance loss in shaded modes, since per-pixel
183  // calculations too massive. Enable this flag to use per-vertex lighting calculation
184  // instead. This will degenerate lighting quality, but will increase performance.
185  };
186  OdUInt32 m_uFlags; // Client flags.
187  OdUInt32 m_nMaxTextureSize; // Maximal texture size
188  OdUInt32 m_nTextureAlignment; // Required default texture alignment
189  // Lineweights
190  float m_nMaxLineWidth; // Maximal line width
191  float m_nMaxPointSize; // Maximal point size
192  // Shaders
193  OdUInt32 m_nMaxFragShadUniformVecs; // Maximum uniform vectors per fragment shader
194  // (for NUM_LIGHTS computation. Pass zero to truncate count for minimal)
195 
197  : m_bObtained(false)
198  , m_ciInfo()
199  , m_uFlags(0)
200  , m_nMaxTextureSize(2048)
202  , m_nMaxLineWidth(1.0f)
203  , m_nMaxPointSize(1.0f)
205  {
206  }
207 
208  // Flag accessors
209 
210  // Textures
211 
214 
217 
218  bool isSupportBGR() const { return GETBIT(m_uFlags, kSupportsBGR); }
219  void setSupportBGR(bool bSet) { SETBIT(m_uFlags, kSupportsBGR, bSet); }
220 
221  bool isSupportBGRA() const { return GETBIT(m_uFlags, kSupportsBGRA); }
222  void setSupportBGRA(bool bSet) { SETBIT(m_uFlags, kSupportsBGRA, bSet); }
223 
224  bool isRequireBGR() const { return GETBIT(m_uFlags, kRequireBGR); }
225  void setRequireBGR(bool bSet) { SETBIT(m_uFlags, kRequireBGR, bSet); }
226 
227  bool isLutOverride() const { return GETBIT(m_uFlags, kOverrideLut); }
228  void setLutOverride(bool bSet) { SETBIT(m_uFlags, kOverrideLut, bSet); }
229 
230  bool isLutMonochrome() const { return GETBIT(m_uFlags, kLutMonochrome); }
231  void setLutMonochrome(bool bSet) { SETBIT(m_uFlags, kLutMonochrome, bSet); }
232  bool overridenLutMonochromeState(bool bDeviceSetting) const
233  { return (isLutOverride()) ? isLutMonochrome() : bDeviceSetting; }
234 
235  bool isLutPalette() const { return GETBIT(m_uFlags, kLutPalette); }
236  void setLutPalette(bool bSet) { SETBIT(m_uFlags, kLutPalette, bSet); }
237  bool overridenLutPaletteState(bool bDeviceSetting) const
238  { return (isLutOverride()) ? isLutPalette() : bDeviceSetting; }
239 
240  // Performance/quality degradation
241 
242  bool isShadeByVertex() const { return GETBIT(m_uFlags, kShadeByVertex); }
243  void setShadeByVertex(bool bSet) { SETBIT(m_uFlags, kShadeByVertex, bSet); }
244  };
245  public:
247 
250 
251  // High-level callbacks
252 
253  // Called on starting vectorizer update.
254  virtual void onDeviceUpdateBegin(OdTrVisRenderClient *pDevice) = 0;
255  // Called on ending vectorizer update.
256  virtual void onDeviceUpdateEnd(OdTrVisRenderClient *pDevice) = 0;
257 
258  // Returns set of bit flags which indicate rendition capabilities/settings
259  virtual OdUInt32 queryRenditionCaps(OdUInt32 requestFor = 0xFFFFFFFF) const = 0;
260  // Rendition capabilities as separate methods
261  // Called to check does rendition supports partial update (have sense for local renditions only).
263  // Check does rendition support snapshot queries
265  // Check does rendition supports composite metafiles
267  // Check does rendition supports visual styles
269  // Check does rendition supports GsFiler-compatible state saving/loading
271  // Check does rendition supports multiple overlapping rendering buffers
273  // Update client-dependent section only
275  // Update shareable section only
277 
278  // Partial update support for local renditions:
279  // Called to setup invalid rectangles and overlays on partial update.
280  virtual void onPartialUpdateInvalidRects(OdTrVisOverlayId overlayId, const OdGsDCRectArray &invalidRects, bool bOverlayInvalid = false) = 0;
281  // Called on partial update query to set entire actual visibilities list.
282  virtual void onPartialUpdateList(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisDisplayId *pList, OdUInt32 nEntries) = 0;
283 
284  // Query snapshot
285  virtual void querySnapshot(OdUInt8 *pScanlines, long minX, long minY, long nWidth, long nHeight) = 0;
286 
287  // Allocate new resource sharing provider compatible with rendition
289 
290  // Multithread processing flags
292 
293  // Returns Id registrator, or NULL if no registration supported
294  virtual IdRegistrator *idRegistrator() const = 0;
295 
296  // Returns true if metafile streams accessible directly, returns stream by Id
297  virtual bool queryMetafileStream(OdTrVisDisplayId displayId, const OdTrVisFlatMetafileContainer **pStream) const = 0;
298 
299  // Returns non-kTrVisNegativeId in case if vectorizer supports ProgramID's embedded into metafile stream
301  OdTrVisGeomType geomType = OdTrVisGeomType_Default, OdUInt32 shadingFlags = 0) const = 0;
302 
303  // GsFiler support
304  virtual bool saveRenditionState(OdGsFiler *pFiler) const = 0;
305  virtual bool loadRenditionState(OdGsFiler *pFiler, OdTrVisIdMap *pIdMap) = 0;
306 
307  // Mid-level callbacks
308 
309  // Client information
310 
311  virtual void obtainClientSettings(ClientSettings &clientSets) = 0;
312 
313  // Surface
314 
315  virtual void onSurfaceChanged(const OdTrVisSurfaceDef &pDef) = 0;
316 
317  // Overlays
318 
319  // Called when new overlay added into device.
320  virtual void onOverlayAdded(OdTrVisOverlayId overlayId, const OdTrVisOverlayDef &pDef) = 0;
321  // Called when exist overlay removed from device.
322  virtual void onOverlayDeleted(OdTrVisOverlayId overlayId) = 0;
323  // Called when overlay visibility changed.
324  virtual void onOverlayVisibilityChanged(OdTrVisOverlayId overlayId, bool bVisibility) = 0;
325  // Called when overlay rendering order changed.
326  virtual void onOverlayRenderOrderChanged(OdTrVisOverlayId overlayId, OdInt16 nRenderOrder) = 0;
327 
328  // Viewports
329 
330  // Called when new viewport added into device.
331  virtual void onViewportAdded(OdTrVisViewportId viewportId/*, const OdTrVisViewportDef &pDef*/) = 0;
332  // Called when viewport removed from device.
333  virtual void onViewportDeleted(OdTrVisViewportId viewportId) = 0;
334  // Called when viewport inserted in list with some index.
335  virtual void onViewportInserted(OdTrVisViewportId viewportId, int nIndex) = 0;
336  // Called when viewport already exist in device modified.
337  virtual void onViewportModified(OdTrVisViewportId viewportId, const OdTrVisViewportDef &pDef, OdUInt32 kindOfMod = kViewportModAll) = 0;
338 
339  // Viewports ordering lists
340 
341  // Called when order of metafiles in viewport is changed (for obtain full list by renderer).
342  virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisDisplayId *pList, OdUInt32 nEntries) = 0;
343  // Called when order of metafiles in viewport is changed (for obtain modified part of list by renderer).
344  virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, OdUInt32 nInvalidFrom, OdUInt32 nInvalidLen,
345  const OdTrVisDisplayId *pValidFrom, OdUInt32 nValidLen) = 0;
346 
347  // Viewport light lists
348 
349  // Called when lights list in viewport is changed.
350  virtual void onLightsListChanged(OdTrVisViewportId viewportId, float ambientLight[4], bool bDefaultLightsOn,
351  const OdTrVisLightDef *pList, OdUInt32 nEntries) = 0;
352 
353  // Viewport background
354 
355  // Called when background stream in viewport is changed.
357  OdTrVisProgramId baseProgramId = kTrVisNegativeId) = 0;
358 
359  // Viewport extents
360 
361  // Called when viewport extents changed
362  virtual void onExtentsChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisExtentsDef &pDef) = 0;
363 
364  // Overlay viewport parameters override
365 
366  // Called when viewport needs override view parameters for specific overlay
367  virtual void onOverlayViewParamsOverride(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, bool bOverride,
368  const OdTrVisViewParamsDef &pDef = OdTrVisViewParamsDef()) = 0;
369 
370  // Metafiles
371 
372  // Called when new metafile added (returns visualId, equal to metafileId by default).
374  // Called when exist metafile deleted.
375  virtual void onMetafileDeleted(OdTrVisMetafileId metafileId) = 0;
376  // Called when exist metafile changed.
377  //virtual void onMetafileModified(OdTrVisMetafileId metafileId, const OdTrVisMetafileDef &pDef) = 0;
378  // Called when exist metafile visibility changed.
379  virtual void onMetafileVisibilityChanged(OdTrVisMetafileId metafileId, bool bVisibility) = 0;
380  // Called when exist metafile highlighting changed.
381  virtual void onMetafileHighlightingChanged(OdTrVisMetafileId metafileId, bool bHighlight) = 0;
382  // Called when exist metafile fading changed.
383  virtual void onMetafileFadingChanged(OdTrVisMetafileId metafileId, bool bFade) = 0;
384  // Called to attach highlighting branch to metafile.
385  virtual void onMetafileHlBranchAttached(OdTrVisMetafileId metafileId, OdTrVisHlBranchId hlBranchId) = 0;
386  // Called to detach highlighting branch from metafile.
387  virtual void onMetafileHlBranchDetached(OdTrVisMetafileId metafileId) = 0;
388 
389  // Highlighting
390 
391  // Called when new highlighting branch added.
392  virtual void onHlBranchAdded(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef) = 0;
393  // Called when exist highlighting branch modified.
394  virtual void onHlBranchModified(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef,
395  bool bChildsModified, bool bMarkersModified) = 0;
396  // Called when exist highlighting branch deleted.
397  virtual void onHlBranchDeleted(OdTrVisHlBranchId hlBranchId) = 0;
398 
399  // Textures
400 
401  // Called when new texture added.
402  virtual void onTextureAdded(OdTrVisTextureId textureId, const OdTrVisTextureDef &pDef) = 0;
403  // Called when exist texture deleted.
404  virtual void onTextureDeleted(OdTrVisTextureId textureId) = 0;
405 
406  // Materials
407 
408  // Called when new material added.
409  virtual void onMaterialAdded(OdTrVisMaterialId materialId, const OdTrVisMaterialDef &pDef) = 0;
410  // Called when exist material deleted.
411  virtual void onMaterialDeleted(OdTrVisMaterialId materialId) = 0;
412 
413  // Visual Styles
414 
415  // Called when new visual style added.
416  virtual void onVisualStyleAdded(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef) = 0;
417  // Called when exist visual style modified.
418  virtual void onVisualStyleModified(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef) = 0;
419  // Called when exist visual style deleted.
420  virtual void onVisualStyleDeleted(OdTrVisVisualStyleId visualStyleId) = 0;
421 
422  // Layers
423 
424  // Called when new layer added.
425  virtual void onLayerAdded(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef) = 0;
426  // Called when exist layer modified.
427  virtual void onLayerModified(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef) = 0;
428  // Called when exist layer deleted.
429  virtual void onLayerDeleted(OdTrVisLayerId layerId) = 0;
430  //Called when layer viewport-dependent properties changed
431  virtual void onLayerViewportPropsOverride(OdTrVisViewportId viewportId, OdTrVisLayerId layerId, bool bOverride, const OdTrVisLayerProps &pProps = OdTrVisLayerProps() ) = 0;
432 };
433 
435 
440 {
441  protected:
443  {
444  virtual void reg(DataType /*type*/, OdTrVisId /*id*/, OdDbStub * /*pPersId*/) { }
445  virtual void reg(DataType /*type*/, OdTrVisId /*id*/, const OdGiDrawable * /*pTransId*/) { }
446  virtual void reg(DataType /*type*/, OdTrVisId /*id*/, const OdTrVisUniqueID & /*uId*/) { }
447  virtual void kill(DataType /*type*/, OdTrVisId /*id*/) { }
448  virtual OdTrVisUniqueID *get(DataType /*type*/, OdTrVisId /*id*/, bool /*bKill*/ = false) const { return NULL; }
450  public:
451  // High-level callbacks
452 
453  // Called on starting vectorizer update.
454  virtual void onDeviceUpdateBegin(OdTrVisRenderClient * /*pDevice*/) { }
455  // Called on ending vectorizer update.
456  virtual void onDeviceUpdateEnd(OdTrVisRenderClient * /*pDevice*/) { }
457 
458  // Returns set of bit flags which indicate rendition capabilities/settings
459  virtual OdUInt32 queryRenditionCaps(OdUInt32 /*requestFor*/ = 0xFFFFFFFF) const { return 0; }
460 
461  // Partial update support for local renditions:
462  // Called to setup invalid rectangles and overlays on partial update.
463  virtual void onPartialUpdateInvalidRects(OdTrVisOverlayId /*overlayId*/, const OdGsDCRectArray & /*invalidRects*/, bool /*bOverlayInvalid*/ = false) { }
464  // Called on partial update query to set entire actual visibilities list.
465  virtual void onPartialUpdateList(OdTrVisViewportId /*viewportId*/, OdTrVisOverlayId /*overlayId*/, const OdTrVisDisplayId * /*pList*/, OdUInt32 /*nEntries*/) { }
466 
467  // Query snapshot
468  virtual void querySnapshot(OdUInt8 * /*pScanlines*/, long /*minX*/, long /*minY*/, long /*nWidth*/, long /*nHeight*/) { }
469 
470  // Allocate new resource sharing provider compatible with rendition
472 
473  // Multithread processing flags
474  virtual MtHandlerType mtDataTypeProcessing(DataType & /*type*/) const { return kMtSkip; }
475 
476  // Returns Id registrator, or NULL if no registration supported
477  virtual IdRegistrator *idRegistrator() const { return NULL; }
478 
479  // Returns true if metafile streams accessible directly, returns stream by Id
480  virtual bool queryMetafileStream(OdTrVisDisplayId /*displayId*/, const OdTrVisFlatMetafileContainer ** /*pStream*/) const { return false; }
481 
482  // Returns non-kTrVisNegativeId in case if vectorizer supports ProgramID's embedded into metafile stream
484  OdTrVisGeomType /*geomType*/ = OdTrVisGeomType_Default, OdUInt32 /*shadingFlags*/ = 0) const
485  { return kTrVisNegativeId; }
486 
487  // GsFiler support
488  virtual bool saveRenditionState(OdGsFiler * /*pFiler*/) const { return false; }
489  virtual bool loadRenditionState(OdGsFiler * /*pFiler*/, OdTrVisIdMap * /*pIdMap*/) { return false; }
490 
491  // Mid-level callbacks
492 
493  // Client information
494 
495  virtual void obtainClientSettings(ClientSettings & /*clientSets*/) { }
496 
497  // Surface
498 
499  virtual void onSurfaceChanged(const OdTrVisSurfaceDef & /*pDef*/) { }
500 
501  // Overlays
502 
503  // Called when new overlay added into device.
504  virtual void onOverlayAdded(OdTrVisOverlayId /*overlayId*/, const OdTrVisOverlayDef & /*pDef*/) { }
505  // Called when exist overlay removed from device.
506  virtual void onOverlayDeleted(OdTrVisOverlayId /*overlayId*/) { }
507  // Called when overlay visibility changed.
508  virtual void onOverlayVisibilityChanged(OdTrVisOverlayId /*overlayId*/, bool /*bVisibility*/) { }
509  // Called when overlay rendering order changed.
510  virtual void onOverlayRenderOrderChanged(OdTrVisOverlayId /*overlayId*/, OdInt16 /*nRenderOrder*/) { }
511 
512  // Viewports
513 
514  // Called when new viewport added into device.
515  virtual void onViewportAdded(OdTrVisViewportId /*viewportId*/ /*, const OdTrVisViewportDef &pDef*/) { }
516  // Called when viewport removed from device.
517  virtual void onViewportDeleted(OdTrVisViewportId /*viewportId*/) { }
518  // Called when viewport inserted in list with some index.
519  virtual void onViewportInserted(OdTrVisViewportId /*viewportId*/, int /*nIndex*/) { }
520  // Called when viewport already exist in device modified.
521  virtual void onViewportModified(OdTrVisViewportId /*viewportId*/, const OdTrVisViewportDef & /*pDef*/, OdUInt32 /*kindOfMod*/ = kViewportModAll) { }
522 
523  // Viewports ordering lists
524 
525  // Called when order of metafiles in viewport is changed.
526  virtual void onMetafileOrderChanged(OdTrVisViewportId /*viewportId*/, OdTrVisOverlayId /*overlayId*/, const OdTrVisDisplayId * /*pList*/, OdUInt32 /*nEntries*/) { }
527  // Called when order of metafiles in viewport is changed (for obtain modified part of list by renderer).
528  virtual void onMetafileOrderChanged(OdTrVisViewportId /*viewportId*/, OdTrVisOverlayId /*overlayId*/, OdUInt32 /*nInvalidFrom*/, OdUInt32 /*nInvalidLen*/,
529  const OdTrVisDisplayId * /*pValidFrom*/, OdUInt32 /*nValidLen*/) { }
530 
531  // Viewport light lists
532 
533  // Called when lights list in viewport is changed.
534  virtual void onLightsListChanged(OdTrVisViewportId /*viewportId*/, float /*ambientLight*/ [4], bool /*bDefaultLightsOn*/,
535  const OdTrVisLightDef * /*pList*/, OdUInt32 /*nEntries*/) { }
536 
537  // Viewport background
538 
539  // Called when background stream in viewport is changed.
541  OdTrVisProgramId /*baseProgramId*/ = kTrVisNegativeId) { }
542 
543  // Viewport extents
544 
545  // Called when viewport extents changed
546  virtual void onExtentsChanged(OdTrVisViewportId /*viewportId*/, OdTrVisOverlayId /*overlayId*/, const OdTrVisExtentsDef & /*pDef*/) { }
547 
548  // Overlay viewport parameters override
549 
550  // Called when viewport needs override view parameters for specific overlay
551  virtual void onOverlayViewParamsOverride(OdTrVisViewportId /*viewportId*/, OdTrVisOverlayId /*overlayId*/, bool /*bOverride*/,
552  const OdTrVisViewParamsDef & /*pDef*/ = OdTrVisViewParamsDef()) { }
553 
554  // Metafiles
555 
556  // Called when new metafile added (returns visualId, equal to metafileId by default).
557  virtual OdTrVisDisplayId onMetafileAdded(OdTrVisMetafileId metafileId, const OdTrVisMetafileDef & /*pDef*/) { return (OdTrVisDisplayId)metafileId; }
558  // Called when exist metafile deleted.
559  virtual void onMetafileDeleted(OdTrVisMetafileId /*metafileId*/) { }
560  // Called when exist metafile changed.
561  //virtual void onMetafileModified(OdTrVisMetafileId /*metafileId*/, const OdTrVisMetafileDef & /*pDef*/) { }
562  // Called when exist metafile visibility changed.
563  virtual void onMetafileVisibilityChanged(OdTrVisMetafileId /*metafileId*/, bool /*bVisibility*/) { }
564  // Called when exist metafile highlighting changed.
565  virtual void onMetafileHighlightingChanged(OdTrVisMetafileId /*metafileId*/, bool /*bHighlight*/) { }
566  // Called when exist metafile fading changed.
567  virtual void onMetafileFadingChanged(OdTrVisMetafileId /*metafileId*/, bool /*bFade*/) { }
568  // Called to attach highlighting branch to metafile.
569  virtual void onMetafileHlBranchAttached(OdTrVisMetafileId /*metafileId*/, OdTrVisHlBranchId /*hlBranchId*/) { }
570  // Called to detach highlighting branch from metafile.
571  virtual void onMetafileHlBranchDetached(OdTrVisMetafileId /*metafileId*/) { }
572 
573  // Highlighting
574 
575  // Called when new highlighting branch added.
576  virtual void onHlBranchAdded(OdTrVisHlBranchId /*hlBranchId*/, const OdTrVisHlBranchDef & /*pDef*/) { }
577  // Called when exist highlighting branch modified.
578  virtual void onHlBranchModified(OdTrVisHlBranchId /*hlBranchId*/, const OdTrVisHlBranchDef & /*pDef*/,
579  bool /*bChildsModified*/, bool /*bMarkersModified*/) { }
580  // Called when exist highlighting branch deleted.
581  virtual void onHlBranchDeleted(OdTrVisHlBranchId /*hlBranchId*/) { }
582 
583  // Textures
584 
585  // Called when new texture added.
586  virtual void onTextureAdded(OdTrVisTextureId /*textureId*/, const OdTrVisTextureDef & /*pDef*/) { }
587  // Called when exist texture deleted.
588  virtual void onTextureDeleted(OdTrVisTextureId /*textureId*/) { }
589 
590  // Materials
591 
592  // Called when new material added.
593  virtual void onMaterialAdded(OdTrVisMaterialId /*materialId*/, const OdTrVisMaterialDef & /*pDef*/) { }
594  // Called when exist material deleted.
595  virtual void onMaterialDeleted(OdTrVisMaterialId /*materialId*/) { }
596 
597  // Visual Styles
598 
599  // Called when new visual style added.
600  virtual void onVisualStyleAdded(OdTrVisVisualStyleId /*visualStyleId*/, const OdTrVisVisualStyle & /*pDef*/) { }
601  // Called when exist visual style modified.
602  virtual void onVisualStyleModified(OdTrVisVisualStyleId /*visualStyleId*/, const OdTrVisVisualStyle & /*pDef*/) { }
603  // Called when exist visual style deleted.
604  virtual void onVisualStyleDeleted(OdTrVisVisualStyleId /*visualStyleId*/) { }
605 
606  // Layers
607 
608  // Called when new layer added.
609  virtual void onLayerAdded(OdTrVisLayerId /*layerId*/, const OdTrVisLayerDef & /*pDef*/) { }
610  // Called when exist layer modified.
611  virtual void onLayerModified(OdTrVisLayerId /*layerId*/, const OdTrVisLayerDef & /*pDef*/) { }
612  // Called when exist layer deleted.
613  virtual void onLayerDeleted(OdTrVisLayerId /*layerId*/) { }
614  //Called when layer viewport-dependent properties changed
615  virtual void onLayerViewportPropsOverride(OdTrVisViewportId viewportId, OdTrVisLayerId layerId, bool bOverride, const OdTrVisLayerProps &pProps = OdTrVisLayerProps() )
616  {
617  }
618 };
619 
624 {
625  protected:
628  public:
630  {
633 
634  void setIdRegRedirection(IdRegistrator *pRedir) { m_pIdRegRedir = pRedir; }
637  bool hasIdRegRedirection() const { return (m_pIdRegRedir != NULL); }
638 
639  virtual void reg(DataType type, OdTrVisId id, OdDbStub *pPersId)
640  {
641  if (hasIdRegRedirection())
642  getIdRegRedirection()->reg(type, id, pPersId);
643  }
644  virtual void reg(DataType type, OdTrVisId id, const OdGiDrawable *pTransId)
645  {
646  if (hasIdRegRedirection())
647  getIdRegRedirection()->reg(type, id, pTransId);
648  }
649  virtual void reg(DataType type, OdTrVisId id, const OdTrVisUniqueID &uId)
650  {
651  if (hasIdRegRedirection())
652  getIdRegRedirection()->reg(type, id, uId);
653  }
654  virtual void kill(DataType type, OdTrVisId id)
655  {
656  if (hasIdRegRedirection())
657  getIdRegRedirection()->kill(type, id);
658  }
659  virtual OdTrVisUniqueID *get(DataType type, OdTrVisId id, bool bKill = false) const
660  {
661  if (hasIdRegRedirection())
662  return getIdRegRedirection()->get(type, id, bKill);
663  return NULL;
664  }
665  };
666  public:
668 
669  void setRedirection(OdTrVisRendition *pRedir) { m_pRedir = pRedir; }
671  const OdTrVisRendition *getRedirection() const { return m_pRedir; }
672  bool hasRedirection() const { return (m_pRedir != NULL); }
673 
676  {
678  throw OdError(eNullPtr);
679  return m_pInformationalRedir;
680  }
682  {
684  throw OdError(eNullPtr);
685  return m_pInformationalRedir;
686  }
688 
690  {
691  setRedirection(pRedir);
693  }
695 
696  // High-level callbacks
697 
698  // Called on starting vectorizer update.
700  {
703  }
704  // Called on ending vectorizer update.
705  virtual void onDeviceUpdateEnd(OdTrVisRenderClient *pDevice)
706  {
709  }
710 
711  // Returns set of bit flags which indicate rendition capabilities/settings
712  virtual OdUInt32 queryRenditionCaps(OdUInt32 requestFor = 0xFFFFFFFF) const
713  {
715  return getInformationalRedirection()->queryRenditionCaps(requestFor);
716  return 0;
717  }
718 
719  // Partial update support for local renditions:
720  // Called to setup invalid rectangles and overlays on partial update.
721  virtual void onPartialUpdateInvalidRects(OdTrVisOverlayId overlayId, const OdGsDCRectArray &invalidRects, bool bOverlayInvalid = false)
722  {
724  getInformationalRedirection()->onPartialUpdateInvalidRects(overlayId, invalidRects, bOverlayInvalid);
725  }
726  // Called on partial update query to set entire actual visibilities list.
727  virtual void onPartialUpdateList(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisDisplayId *pList, OdUInt32 nEntries)
728  {
730  getInformationalRedirection()->onPartialUpdateList(viewportId, overlayId, pList, nEntries);
731  }
732 
733  // Query snapshot
734  virtual void querySnapshot(OdUInt8 *pScanlines, long minX, long minY, long nWidth, long nHeight)
735  {
737  getInformationalRedirection()->querySnapshot(pScanlines, minX, minY, nWidth, nHeight);
738  }
739 
740  // Allocate new resource sharing provider compatible with rendition
742  {
746  }
747 
748  // Multithread processing flags
750  {
753  return kMtSkip;
754  }
755 
756  // Returns Id registrator, or NULL if no registration supported
757  virtual IdRegistrator *idRegistrator() const
758  {
761  return NULL;
762  }
763 
764  // Returns true if metafile streams accessible directly, returns stream by Id
765  virtual bool queryMetafileStream(OdTrVisDisplayId displayId, const OdTrVisFlatMetafileContainer **pStream) const
766  {
768  return getInformationalRedirection()->queryMetafileStream(displayId, pStream);
769  return false;
770  }
771 
772  // Returns non-kTrVisNegativeId in case if vectorizer supports ProgramID's embedded into metafile stream
774  OdTrVisGeomType geomType = OdTrVisGeomType_Default, OdUInt32 shadingFlags = 0) const
775  {
777  return getInformationalRedirection()->queryProgramId(mode, vsId, geomType, shadingFlags);
778  return kTrVisNegativeId;
779  }
780 
781  // GsFiler support
782  virtual bool saveRenditionState(OdGsFiler *pFiler) const
783  {
786  return false;
787  }
788  virtual bool loadRenditionState(OdGsFiler *pFiler, OdTrVisIdMap *pIdMap)
789  {
791  return getInformationalRedirection()->loadRenditionState(pFiler, pIdMap);
792  return false;
793  }
794 
795  // Mid-level callbacks
796 
797  // Client information
798 
799  virtual void obtainClientSettings(ClientSettings &clientSets)
800  {
803  }
804 
805  // Surface
806 
807  virtual void onSurfaceChanged(const OdTrVisSurfaceDef &pDef)
808  {
809  if (hasRedirection())
811  }
812 
813  // Overlays
814 
815  // Called when new overlay added into device.
816  virtual void onOverlayAdded(OdTrVisOverlayId overlayId, const OdTrVisOverlayDef &pDef)
817  {
818  if (hasRedirection())
819  getRedirection()->onOverlayAdded(overlayId, pDef);
820  }
821  // Called when exist overlay removed from device.
822  virtual void onOverlayDeleted(OdTrVisOverlayId overlayId)
823  {
824  if (hasRedirection())
825  getRedirection()->onOverlayDeleted(overlayId);
826  }
827  // Called when overlay visibility changed.
828  virtual void onOverlayVisibilityChanged(OdTrVisOverlayId overlayId, bool bVisibility)
829  {
830  if (hasRedirection())
831  getRedirection()->onOverlayVisibilityChanged(overlayId, bVisibility);
832  }
833  // Called when overlay rendering order changed.
834  virtual void onOverlayRenderOrderChanged(OdTrVisOverlayId overlayId, OdInt16 nRenderOrder)
835  {
836  if (hasRedirection())
837  getRedirection()->onOverlayRenderOrderChanged(overlayId, nRenderOrder);
838  }
839 
840  // Viewports
841 
842  // Called when new viewport added into device.
843  virtual void onViewportAdded(OdTrVisViewportId viewportId /*, const OdTrVisViewportDef &pDef*/)
844  {
845  if (hasRedirection())
846  getRedirection()->onViewportAdded(viewportId);
847  }
848  // Called when viewport removed from device.
849  virtual void onViewportDeleted(OdTrVisViewportId viewportId)
850  {
851  if (hasRedirection())
852  getRedirection()->onViewportDeleted(viewportId);
853  }
854  // Called when viewport inserted in list with some index.
855  virtual void onViewportInserted(OdTrVisViewportId viewportId, int nIndex)
856  {
857  if (hasRedirection())
858  getRedirection()->onViewportInserted(viewportId, nIndex);
859  }
860  // Called when viewport already exist in device modified.
861  virtual void onViewportModified(OdTrVisViewportId viewportId, const OdTrVisViewportDef &pDef, OdUInt32 kindOfMod = kViewportModAll)
862  {
863  if (hasRedirection())
864  getRedirection()->onViewportModified(viewportId, pDef, kindOfMod);
865  }
866 
867  // Viewports ordering lists
868 
869  // Called when order of metafiles in viewport is changed.
870  virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisDisplayId *pList, OdUInt32 nEntries)
871  {
872  if (hasRedirection())
873  getRedirection()->onMetafileOrderChanged(viewportId, overlayId, pList, nEntries);
874  }
875  // Called when order of metafiles in viewport is changed (for obtain modified part of list by renderer).
876  virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, OdUInt32 nInvalidFrom, OdUInt32 nInvalidLen,
877  const OdTrVisDisplayId *pValidFrom, OdUInt32 nValidLen)
878  {
879  if (hasRedirection())
880  getRedirection()->onMetafileOrderChanged(viewportId, overlayId, nInvalidFrom, nInvalidLen, pValidFrom, nValidLen);
881  }
882 
883  // Viewport light lists
884 
885  // Called when lights list in viewport is changed.
886  virtual void onLightsListChanged(OdTrVisViewportId viewportId, float ambientLight[4], bool bDefaultLightsOn,
887  const OdTrVisLightDef *pList, OdUInt32 nEntries)
888  {
889  if (hasRedirection())
890  getRedirection()->onLightsListChanged(viewportId, ambientLight, bDefaultLightsOn, pList, nEntries);
891  }
892 
893  // Viewport background
894 
895  // Called when background stream in viewport is changed.
897  OdTrVisProgramId baseProgramId = kTrVisNegativeId)
898  {
899  if (hasRedirection())
900  getRedirection()->onBackgroundChanged(viewportId, pStream, baseProgramId);
901  }
902 
903  // Viewport extents
904 
905  // Called when viewport extents changed
906  virtual void onExtentsChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisExtentsDef &pDef)
907  {
908  if (hasRedirection())
909  getRedirection()->onExtentsChanged(viewportId, overlayId, pDef);
910  }
911 
912  // Overlay viewport parameters override
913 
914  // Called when viewport needs override view parameters for specific overlay
915  virtual void onOverlayViewParamsOverride(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, bool bOverride,
917  {
918  if (hasRedirection())
919  getRedirection()->onOverlayViewParamsOverride(viewportId, overlayId, bOverride, pDef);
920  }
921 
922  // Metafiles
923 
924  // Called when new metafile added (returns visualId, equal to metafileId by default).
926  {
927  if (hasRedirection())
928  return getRedirection()->onMetafileAdded(metafileId, pDef);
929  return metafileId;
930  }
931  // Called when exist metafile deleted.
932  virtual void onMetafileDeleted(OdTrVisMetafileId metafileId)
933  {
934  if (hasRedirection())
935  getRedirection()->onMetafileDeleted(metafileId);
936  }
937  // Called when exist metafile changed.
938  //virtual void onMetafileModified(OdTrVisMetafileId metafileId, const OdTrVisMetafileDef &pDef)
939  //{
940  // if (hasRedirection())
941  // getRedirection()->onMetafileModified(metafileId, pDef);
942  //}
943  // Called when exist metafile visibility changed.
944  virtual void onMetafileVisibilityChanged(OdTrVisMetafileId metafileId, bool bVisibility)
945  {
946  if (hasRedirection())
947  getRedirection()->onMetafileVisibilityChanged(metafileId, bVisibility);
948  }
949  // Called when exist metafile highlighting changed.
950  virtual void onMetafileHighlightingChanged(OdTrVisMetafileId metafileId, bool bHighlight)
951  {
952  if (hasRedirection())
953  getRedirection()->onMetafileHighlightingChanged(metafileId, bHighlight);
954  }
955  // Called when exist metafile fading changed.
956  virtual void onMetafileFadingChanged(OdTrVisMetafileId metafileId, bool bFade)
957  {
958  if (hasRedirection())
959  getRedirection()->onMetafileFadingChanged(metafileId, bFade);
960  }
961  // Called to attach highlighting branch to metafile.
963  {
964  if (hasRedirection())
965  getRedirection()->onMetafileHlBranchAttached(metafileId, hlBranchId);
966  }
967  // Called to detach highlighting branch from metafile.
969  {
970  if (hasRedirection())
972  }
973 
974  // Highlighting
975 
976  // Called when new highlighting branch added.
977  virtual void onHlBranchAdded(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef)
978  {
979  if (hasRedirection())
980  getRedirection()->onHlBranchAdded(hlBranchId, pDef);
981  }
982  // Called when exist highlighting branch modified.
983  virtual void onHlBranchModified(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef,
984  bool bChildsModified, bool bMarkersModified)
985  {
986  if (hasRedirection())
987  getRedirection()->onHlBranchModified(hlBranchId, pDef, bChildsModified, bMarkersModified);
988  }
989  // Called when exist highlighting branch deleted.
990  virtual void onHlBranchDeleted(OdTrVisHlBranchId hlBranchId)
991  {
992  if (hasRedirection())
993  getRedirection()->onHlBranchDeleted(hlBranchId);
994  }
995 
996  // Textures
997 
998  // Called when new texture added.
999  virtual void onTextureAdded(OdTrVisTextureId textureId, const OdTrVisTextureDef &pDef)
1000  {
1001  if (hasRedirection())
1002  getRedirection()->onTextureAdded(textureId, pDef);
1003  }
1004  // Called when exist texture deleted.
1005  virtual void onTextureDeleted(OdTrVisTextureId textureId)
1006  {
1007  if (hasRedirection())
1008  getRedirection()->onTextureDeleted(textureId);
1009  }
1010 
1011  // Materials
1012 
1013  // Called when new material added.
1014  virtual void onMaterialAdded(OdTrVisMaterialId materialId, const OdTrVisMaterialDef &pDef)
1015  {
1016  if (hasRedirection())
1017  getRedirection()->onMaterialAdded(materialId, pDef);
1018  }
1019  // Called when exist material deleted.
1020  virtual void onMaterialDeleted(OdTrVisMaterialId materialId)
1021  {
1022  if (hasRedirection())
1023  getRedirection()->onMaterialDeleted(materialId);
1024  }
1025 
1026  // Visual Styles
1027 
1028  // Called when new visual style added.
1029  virtual void onVisualStyleAdded(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef)
1030  {
1031  if (hasRedirection())
1032  getRedirection()->onVisualStyleAdded(visualStyleId, pDef);
1033  }
1034  // Called when exist visual style modified.
1035  virtual void onVisualStyleModified(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef)
1036  {
1037  if (hasRedirection())
1038  getRedirection()->onVisualStyleModified(visualStyleId, pDef);
1039  }
1040  // Called when exist visual style deleted.
1041  virtual void onVisualStyleDeleted(OdTrVisVisualStyleId visualStyleId)
1042  {
1043  if (hasRedirection())
1044  getRedirection()->onVisualStyleDeleted(visualStyleId);
1045  }
1046 
1047  // Layers
1048 
1049  // Called when new layer added.
1050  virtual void onLayerAdded(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef)
1051  {
1052  if (hasRedirection())
1053  getRedirection()->onLayerAdded(layerId, pDef);
1054  }
1055  // Called when exist layer modified.
1056  virtual void onLayerModified(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef)
1057  {
1058  if (hasRedirection())
1059  getRedirection()->onLayerModified(layerId, pDef);
1060  }
1061  // Called when exist layer deleted.
1062  virtual void onLayerDeleted(OdTrVisLayerId layerId)
1063  {
1064  if (hasRedirection())
1065  getRedirection()->onLayerDeleted(layerId);
1066  }
1067  //Called when layer viewport-dependent properties changed
1068  virtual void onLayerViewportPropsOverride(OdTrVisViewportId viewportId, OdTrVisLayerId layerId, bool bOverride, const OdTrVisLayerProps &pProps = OdTrVisLayerProps() )
1069  {
1070  if( hasRedirection())
1071  getRedirection()->onLayerViewportPropsOverride( viewportId, layerId, bOverride, pProps );
1072  }
1073 };
1074 
1079 {
1080  public:
1081  struct CallRecord
1082  {
1085  virtual ~CallRecord() { }
1086  virtual void reDrop(OdTrVisRendition *pRendition) = 0;
1087  };
1088  protected:
1091  public:
1094 
1095  void appendRecord(CallRecord *pRecord);
1096  void playRecords(OdTrVisRendition *pRendition, bool bClear = false);
1098  bool hasRecords() const { return (m_pFirstRecord != NULL); }
1099 
1100  // High-level callbacks
1101 
1102  // Multithread processing flags
1103  virtual MtHandlerType mtDataTypeProcessing(DataType & /*type*/) const { return kMtGlobal; }
1104 
1105  // Returns Id registrator, or NULL if no registration supported
1107 
1108  // Mid-level callbacks
1109 
1110  // Surface
1111 
1112  virtual void onSurfaceChanged(const OdTrVisSurfaceDef &pDef);
1113 
1114  // Overlays
1115 
1116  // Called when new overlay added into device.
1117  virtual void onOverlayAdded(OdTrVisOverlayId overlayId, const OdTrVisOverlayDef &pDef);
1118  // Called when exist overlay removed from device.
1119  virtual void onOverlayDeleted(OdTrVisOverlayId overlayId);
1120  // Called when overlay visibility changed.
1121  virtual void onOverlayVisibilityChanged(OdTrVisOverlayId overlayId, bool bVisibility);
1122  // Called when overlay rendering order changed.
1123  virtual void onOverlayRenderOrderChanged(OdTrVisOverlayId overlayId, OdInt16 nRenderOrder);
1124 
1125  // Viewports
1126 
1127  // Called when new viewport added into device.
1128  virtual void onViewportAdded(OdTrVisViewportId viewportId /*, const OdTrVisViewportDef &pDef*/);
1129  // Called when viewport removed from device.
1130  virtual void onViewportDeleted(OdTrVisViewportId viewportId);
1131  // Called when viewport inserted in list with some index.
1132  virtual void onViewportInserted(OdTrVisViewportId viewportId, int nIndex);
1133  // Called when viewport already exist in device modified.
1134  virtual void onViewportModified(OdTrVisViewportId viewportId, const OdTrVisViewportDef &pDef, OdUInt32 kindOfMod = kViewportModAll);
1135 
1136  // Viewports ordering lists
1137 
1138  // Called when order of metafiles in viewport is changed.
1139  virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisDisplayId *pList, OdUInt32 nEntries);
1140  // Called when order of metafiles in viewport is changed (for obtain modified part of list by renderer).
1141  virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, OdUInt32 nInvalidFrom, OdUInt32 nInvalidLen,
1142  const OdTrVisDisplayId *pValidFrom, OdUInt32 nValidLen);
1143 
1144  // Viewport light lists
1145 
1146  // Called when lights list in viewport is changed.
1147  virtual void onLightsListChanged(OdTrVisViewportId viewportId, float ambientLight[4], bool bDefaultLightsOn,
1148  const OdTrVisLightDef *pList, OdUInt32 nEntries);
1149 
1150  // Viewport background
1151 
1152  // Called when background stream in viewport is changed.
1154  OdTrVisProgramId baseProgramId = kTrVisNegativeId);
1155 
1156  // Viewport extents
1157 
1158  // Called when viewport extents changed
1159  virtual void onExtentsChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisExtentsDef &pDef);
1160 
1161  // Overlay viewport parameters override
1162 
1163  // Called when viewport needs override view parameters for specific overlay
1164  virtual void onOverlayViewParamsOverride(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, bool bOverride,
1165  const OdTrVisViewParamsDef &pDef = OdTrVisViewParamsDef());
1166 
1167  // Metafiles
1168 
1169  // Called when new metafile added (returns visualId, equal to metafileId by default).
1171  // Called when exist metafile deleted.
1172  virtual void onMetafileDeleted(OdTrVisMetafileId metafileId);
1173  // Called when exist metafile changed.
1174  //virtual void onMetafileModified(OdTrVisMetafileId metafileId, const OdTrVisMetafileDef &pDef);
1175  // Called when exist metafile visibility changed.
1176  virtual void onMetafileVisibilityChanged(OdTrVisMetafileId metafileId, bool bVisibility);
1177  // Called when exist metafile highlighting changed.
1178  virtual void onMetafileHighlightingChanged(OdTrVisMetafileId metafileId, bool bHighlight);
1179  // Called when exist metafile fading changed.
1180  virtual void onMetafileFadingChanged(OdTrVisMetafileId metafileId, bool bFade);
1181  // Called to attach highlighting branch to metafile.
1183  // Called to detach highlighting branch from metafile.
1185 
1186  // Highlighting
1187 
1188  // Called when new highlighting branch added.
1189  virtual void onHlBranchAdded(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef);
1190  // Called when exist highlighting branch modified.
1191  virtual void onHlBranchModified(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef,
1192  bool bChildsModified, bool bMarkersModified);
1193  // Called when exist highlighting branch deleted.
1194  virtual void onHlBranchDeleted(OdTrVisHlBranchId hlBranchId);
1195 
1196  // Textures
1197 
1198  // Called when new texture added.
1199  virtual void onTextureAdded(OdTrVisTextureId textureId, const OdTrVisTextureDef &pDef);
1200  // Called when exist texture deleted.
1201  virtual void onTextureDeleted(OdTrVisTextureId textureId);
1202 
1203  // Materials
1204 
1205  // Called when new material added.
1206  virtual void onMaterialAdded(OdTrVisMaterialId materialId, const OdTrVisMaterialDef &pDef);
1207  // Called when exist material deleted.
1208  virtual void onMaterialDeleted(OdTrVisMaterialId materialId);
1209 
1210  // Visual Styles
1211 
1212  // Called when new visual style added.
1213  virtual void onVisualStyleAdded(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef);
1214  // Called when exist visual style modified.
1215  virtual void onVisualStyleModified(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef);
1216  // Called when exist visual style deleted.
1217  virtual void onVisualStyleDeleted(OdTrVisVisualStyleId visualStyleId);
1218 
1219  // Layers
1220 
1221  // Called when new layer added.
1222  virtual void onLayerAdded(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef);
1223  // Called when exist layer modified.
1224  virtual void onLayerModified(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef);
1225  // Called when exist layer deleted.
1226  virtual void onLayerDeleted(OdTrVisLayerId layerId);
1227  //Called when layer viewport-dependent properties changed
1228  virtual void onLayerViewportPropsOverride(OdTrVisViewportId viewportId, OdTrVisLayerId layerId, bool bOverride, const OdTrVisLayerProps &pProps = OdTrVisLayerProps() );
1229  protected:
1230  // IdRegistrator overrides
1231  virtual void reg(DataType type, OdTrVisId id, OdDbStub *pPersId);
1232  virtual void reg(DataType type, OdTrVisId id, const OdGiDrawable *pTransId);
1233  virtual void reg(DataType type, OdTrVisId id, const OdTrVisUniqueID &uId);
1234  virtual void kill(DataType type, OdTrVisId id);
1235  virtual OdTrVisUniqueID *get(DataType type, OdTrVisId id, bool bKill = false) const;
1236 };
1237 
1242 {
1243  protected:
1245  {
1257  protected:
1258  mutable struct IdRegistratorMt : public IdRegistrator
1259  {
1263  virtual void reg(DataType type, OdTrVisId id, OdDbStub *pPersId);
1264  virtual void reg(DataType type, OdTrVisId id, const OdGiDrawable *pTransId);
1265  virtual void reg(DataType type, OdTrVisId id, const OdTrVisUniqueID &uId);
1266  virtual void kill(DataType type, OdTrVisId id);
1267  virtual OdTrVisUniqueID *get(DataType type, OdTrVisId id, bool bKill = false) const;
1268  void getset(IdRegistrator *pBaseRegistrator) { m_pBaseRegistrator = pBaseRegistrator; }
1269  IdRegistrator *setget() { return (m_pBaseRegistrator) ? this : NULL; }
1271  public:
1274 
1275  // Initialize Mt rendition
1276  void init(OdTrVisRendition *pRendition);
1277  // Check does rendition is ready for Mt
1278  bool isMt() const;
1279 
1280  // High-level callbacks
1281 
1282  // Called on starting vectorizer update.
1284  // Called on ending vectorizer update.
1285  virtual void onDeviceUpdateEnd(OdTrVisRenderClient *pDevice);
1286 
1287  // Returns Id registrator, or NULL if no registration supported
1288  virtual IdRegistrator *idRegistrator() const;
1289 
1290  // Returns true if metafile streams accessible directly, returns stream by Id
1291  virtual bool queryMetafileStream(OdTrVisDisplayId displayId, const OdTrVisFlatMetafileContainer **pStream) const;
1292 
1293  // Returns non-kTrVisNegativeId in case if vectorizer supports ProgramID's embedded into metafile stream
1295  OdTrVisGeomType geomType = OdTrVisGeomType_Default, OdUInt32 shadingFlags = 0) const;
1296 
1297  // Mid-level callbacks
1298 
1299  // Client information
1300 
1301  virtual void obtainClientSettings(ClientSettings &clientSets);
1302 
1303  // Surface
1304 
1305  virtual void onSurfaceChanged(const OdTrVisSurfaceDef &pDef);
1306 
1307  // Overlays
1308 
1309  // Called when new overlay added into device.
1310  virtual void onOverlayAdded(OdTrVisOverlayId overlayId, const OdTrVisOverlayDef &pDef);
1311  // Called when exist overlay removed from device.
1312  virtual void onOverlayDeleted(OdTrVisOverlayId overlayId);
1313  // Called when overlay visibility changed.
1314  virtual void onOverlayVisibilityChanged(OdTrVisOverlayId overlayId, bool bVisibility);
1315  // Called when overlay rendering order changed.
1316  virtual void onOverlayRenderOrderChanged(OdTrVisOverlayId overlayId, OdInt16 nRenderOrder);
1317 
1318  // Viewports
1319 
1320  // Called when new viewport added into device.
1321  virtual void onViewportAdded(OdTrVisViewportId viewportId /*, const OdTrVisViewportDef &pDef*/);
1322  // Called when viewport removed from device.
1323  virtual void onViewportDeleted(OdTrVisViewportId viewportId);
1324  // Called when viewport inserted in list with some index.
1325  virtual void onViewportInserted(OdTrVisViewportId viewportId, int nIndex);
1326  // Called when viewport already exist in device modified.
1327  virtual void onViewportModified(OdTrVisViewportId viewportId, const OdTrVisViewportDef &pDef, OdUInt32 kindOfMod = kViewportModAll);
1328 
1329  // Viewports ordering lists
1330 
1331  // Called when order of metafiles in viewport is changed.
1332  virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisDisplayId *pList, OdUInt32 nEntries);
1333  // Called when order of metafiles in viewport is changed (for obtain modified part of list by renderer).
1334  virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, OdUInt32 nInvalidFrom, OdUInt32 nInvalidLen,
1335  const OdTrVisDisplayId *pValidFrom, OdUInt32 nValidLen);
1336 
1337  // Viewport light lists
1338 
1339  // Called when lights list in viewport is changed.
1340  virtual void onLightsListChanged(OdTrVisViewportId viewportId, float ambientLight[4], bool bDefaultLightsOn,
1341  const OdTrVisLightDef *pList, OdUInt32 nEntries);
1342 
1343  // Viewport background
1344 
1345  // Called when background stream in viewport is changed.
1347  OdTrVisProgramId baseProgramId = kTrVisNegativeId);
1348 
1349  // Viewport extents
1350 
1351  // Called when viewport extents changed
1352  virtual void onExtentsChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisExtentsDef &pDef);
1353 
1354  // Overlay viewport parameters override
1355 
1356  // Called when viewport needs override view parameters for specific overlay
1357  virtual void onOverlayViewParamsOverride(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, bool bOverride,
1358  const OdTrVisViewParamsDef &pDef = OdTrVisViewParamsDef());
1359 
1360  // Metafiles
1361 
1362  // Called when new metafile added (returns visualId, equal to metafileId by default).
1364  // Called when exist metafile deleted.
1365  virtual void onMetafileDeleted(OdTrVisMetafileId metafileId);
1366  // Called when exist metafile changed.
1367  //virtual void onMetafileModified(OdTrVisMetafileId metafileId, const OdTrVisMetafileDef &pDef);
1368  // Called when exist metafile visibility changed.
1369  virtual void onMetafileVisibilityChanged(OdTrVisMetafileId metafileId, bool bVisibility);
1370  // Called when exist metafile highlighting changed.
1371  virtual void onMetafileHighlightingChanged(OdTrVisMetafileId metafileId, bool bHighlight);
1372  // Called when exist metafile fading changed.
1373  virtual void onMetafileFadingChanged(OdTrVisMetafileId metafileId, bool bFade);
1374  // Called to attach highlighting branch to metafile.
1376  // Called to detach highlighting branch from metafile.
1378 
1379  // Highlighting
1380 
1381  // Called when new highlighting branch added.
1382  virtual void onHlBranchAdded(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef);
1383  // Called when exist highlighting branch modified.
1384  virtual void onHlBranchModified(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef,
1385  bool bChildsModified, bool bMarkersModified);
1386  // Called when exist highlighting branch deleted.
1387  virtual void onHlBranchDeleted(OdTrVisHlBranchId hlBranchId);
1388 
1389  // Textures
1390 
1391  // Called when new texture added.
1392  virtual void onTextureAdded(OdTrVisTextureId textureId, const OdTrVisTextureDef &pDef);
1393  // Called when exist texture deleted.
1394  virtual void onTextureDeleted(OdTrVisTextureId textureId);
1395 
1396  // Materials
1397 
1398  // Called when new material added.
1399  virtual void onMaterialAdded(OdTrVisMaterialId materialId, const OdTrVisMaterialDef &pDef);
1400  // Called when exist material deleted.
1401  virtual void onMaterialDeleted(OdTrVisMaterialId materialId);
1402 
1403  // Visual Styles
1404 
1405  // Called when new visual style added.
1406  virtual void onVisualStyleAdded(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef);
1407  // Called when exist visual style modified.
1408  virtual void onVisualStyleModified(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef);
1409  // Called when exist visual style deleted.
1410  virtual void onVisualStyleDeleted(OdTrVisVisualStyleId visualStyleId);
1411 
1412  // Layers
1413 
1414  // Called when new layer added.
1415  virtual void onLayerAdded(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef);
1416  // Called when exist layer modified.
1417  virtual void onLayerModified(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef);
1418  // Called when exist layer deleted.
1419  virtual void onLayerDeleted(OdTrVisLayerId layerId);
1420  //Called when layer viewport-dependent properties changed
1421  virtual void onLayerViewportPropsOverride(OdTrVisViewportId viewportId, OdTrVisLayerId layerId, bool bOverride, const OdTrVisLayerProps &pProps = OdTrVisLayerProps() );
1422 };
1423 
1424 #include "TD_PackPop.h"
1425 
1426 #endif // ODTRVISRENDITION
false
Definition: DimVarDefs.h:165
#define NULL
Definition: GsProperties.h:177
unsigned int OdUInt32
short OdInt16
unsigned char OdUInt8
#define SETBIT(flags, bit, value)
Definition: OdaDefs.h:499
#define GETBIT(flags, bit)
Definition: OdaDefs.h:500
const OdTrVisId kTrVisNegativeId
Definition: TrVisDefs.h:110
OdTrVisGeomType
@ OdTrVisGeomType_Default
OdSmartPtr< OdTrVisRendition > OdTrVisRenditionPtr
OdSmartPtr< OdTrVisSharingProviderClient > OdTrVisSharingProviderClientPtr
RenderMode
Definition: Gs.h:138
virtual void onViewportDeleted(OdTrVisViewportId)
virtual void onLayerViewportPropsOverride(OdTrVisViewportId viewportId, OdTrVisLayerId layerId, bool bOverride, const OdTrVisLayerProps &pProps=OdTrVisLayerProps())
virtual void onMetafileVisibilityChanged(OdTrVisMetafileId, bool)
virtual void onVisualStyleModified(OdTrVisVisualStyleId, const OdTrVisVisualStyle &)
virtual void onTextureAdded(OdTrVisTextureId, const OdTrVisTextureDef &)
virtual void onBackgroundChanged(OdTrVisViewportId, OdTrVisFlatMetafileContainerPtr, OdTrVisProgramId=kTrVisNegativeId)
virtual MtHandlerType mtDataTypeProcessing(DataType &) const
virtual void onMetafileOrderChanged(OdTrVisViewportId, OdTrVisOverlayId, const OdTrVisDisplayId *, OdUInt32)
virtual OdTrVisDisplayId onMetafileAdded(OdTrVisMetafileId metafileId, const OdTrVisMetafileDef &)
virtual void onMaterialDeleted(OdTrVisMaterialId)
virtual void onMetafileHlBranchAttached(OdTrVisMetafileId, OdTrVisHlBranchId)
virtual void onVisualStyleDeleted(OdTrVisVisualStyleId)
virtual void onDeviceUpdateEnd(OdTrVisRenderClient *)
virtual OdTrVisProgramId queryProgramId(OdGsView::RenderMode, OdTrVisVisualStyleId=kTrVisNegativeId, OdTrVisGeomType=OdTrVisGeomType_Default, OdUInt32=0) const
virtual void onDeviceUpdateBegin(OdTrVisRenderClient *)
virtual void onLayerDeleted(OdTrVisLayerId)
virtual void onOverlayViewParamsOverride(OdTrVisViewportId, OdTrVisOverlayId, bool, const OdTrVisViewParamsDef &=OdTrVisViewParamsDef())
virtual void onViewportModified(OdTrVisViewportId, const OdTrVisViewportDef &, OdUInt32=kViewportModAll)
virtual void onMetafileHighlightingChanged(OdTrVisMetafileId, bool)
virtual void onExtentsChanged(OdTrVisViewportId, OdTrVisOverlayId, const OdTrVisExtentsDef &)
virtual void onOverlayDeleted(OdTrVisOverlayId)
virtual void onOverlayAdded(OdTrVisOverlayId, const OdTrVisOverlayDef &)
virtual void onVisualStyleAdded(OdTrVisVisualStyleId, const OdTrVisVisualStyle &)
virtual void onOverlayVisibilityChanged(OdTrVisOverlayId, bool)
virtual void querySnapshot(OdUInt8 *, long, long, long, long)
virtual void onPartialUpdateList(OdTrVisViewportId, OdTrVisOverlayId, const OdTrVisDisplayId *, OdUInt32)
virtual void obtainClientSettings(ClientSettings &)
virtual IdRegistrator * idRegistrator() const
virtual bool queryMetafileStream(OdTrVisDisplayId, const OdTrVisFlatMetafileContainer **) const
virtual void onHlBranchDeleted(OdTrVisHlBranchId)
virtual void onMetafileOrderChanged(OdTrVisViewportId, OdTrVisOverlayId, OdUInt32, OdUInt32, const OdTrVisDisplayId *, OdUInt32)
virtual void onViewportAdded(OdTrVisViewportId)
virtual void onLayerAdded(OdTrVisLayerId, const OdTrVisLayerDef &)
virtual void onMetafileFadingChanged(OdTrVisMetafileId, bool)
virtual void onHlBranchAdded(OdTrVisHlBranchId, const OdTrVisHlBranchDef &)
virtual void onTextureDeleted(OdTrVisTextureId)
virtual OdUInt32 queryRenditionCaps(OdUInt32=0xFFFFFFFF) const
virtual void onHlBranchModified(OdTrVisHlBranchId, const OdTrVisHlBranchDef &, bool, bool)
virtual void onPartialUpdateInvalidRects(OdTrVisOverlayId, const OdGsDCRectArray &, bool=false)
virtual bool loadRenditionState(OdGsFiler *, OdTrVisIdMap *)
virtual void onViewportInserted(OdTrVisViewportId, int)
virtual void onSurfaceChanged(const OdTrVisSurfaceDef &)
virtual void onMetafileDeleted(OdTrVisMetafileId)
virtual void onLayerModified(OdTrVisLayerId, const OdTrVisLayerDef &)
virtual bool saveRenditionState(OdGsFiler *) const
virtual void onMetafileHlBranchDetached(OdTrVisMetafileId)
virtual void onLightsListChanged(OdTrVisViewportId, float[4], bool, const OdTrVisLightDef *, OdUInt32)
virtual void onMaterialAdded(OdTrVisMaterialId, const OdTrVisMaterialDef &)
virtual OdTrVisSharingProviderClientPtr createSharingProvider()
OdTrVisRenditionDef::IdRegistratorStub m_IdRegistratorStub
virtual void onOverlayRenderOrderChanged(OdTrVisOverlayId, OdInt16)
virtual void onViewportAdded(OdTrVisViewportId viewportId)=0
virtual void onMaterialAdded(OdTrVisMaterialId materialId, const OdTrVisMaterialDef &pDef)=0
virtual void onLayerDeleted(OdTrVisLayerId layerId)=0
virtual void onMetafileHighlightingChanged(OdTrVisMetafileId metafileId, bool bHighlight)=0
virtual void onVisualStyleDeleted(OdTrVisVisualStyleId visualStyleId)=0
virtual void onDeviceUpdateBegin(OdTrVisRenderClient *pDevice)=0
virtual void onLightsListChanged(OdTrVisViewportId viewportId, float ambientLight[4], bool bDefaultLightsOn, const OdTrVisLightDef *pList, OdUInt32 nEntries)=0
ODRX_USING_HEAP_OPERATORS(OdRxObject)
virtual void querySnapshot(OdUInt8 *pScanlines, long minX, long minY, long nWidth, long nHeight)=0
virtual void onOverlayAdded(OdTrVisOverlayId overlayId, const OdTrVisOverlayDef &pDef)=0
virtual void onHlBranchDeleted(OdTrVisHlBranchId hlBranchId)=0
virtual void onHlBranchAdded(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef)=0
virtual void onLayerAdded(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef)=0
virtual void onExtentsChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisExtentsDef &pDef)=0
virtual void onMetafileHlBranchDetached(OdTrVisMetafileId metafileId)=0
virtual void onMaterialDeleted(OdTrVisMaterialId materialId)=0
virtual void onVisualStyleAdded(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef)=0
virtual bool loadRenditionState(OdGsFiler *pFiler, OdTrVisIdMap *pIdMap)=0
virtual void onPartialUpdateList(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisDisplayId *pList, OdUInt32 nEntries)=0
virtual void onOverlayViewParamsOverride(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, bool bOverride, const OdTrVisViewParamsDef &pDef=OdTrVisViewParamsDef())=0
virtual OdUInt32 queryRenditionCaps(OdUInt32 requestFor=0xFFFFFFFF) const =0
virtual void onMetafileDeleted(OdTrVisMetafileId metafileId)=0
virtual void onLayerViewportPropsOverride(OdTrVisViewportId viewportId, OdTrVisLayerId layerId, bool bOverride, const OdTrVisLayerProps &pProps=OdTrVisLayerProps())=0
bool isSupportSnapshotQueries() const
bool updateClientDependentSectionOnly() const
virtual void onMetafileHlBranchAttached(OdTrVisMetafileId metafileId, OdTrVisHlBranchId hlBranchId)=0
virtual OdTrVisProgramId queryProgramId(OdGsView::RenderMode mode, OdTrVisVisualStyleId vsId=kTrVisNegativeId, OdTrVisGeomType geomType=OdTrVisGeomType_Default, OdUInt32 shadingFlags=0) const =0
virtual void onMetafileVisibilityChanged(OdTrVisMetafileId metafileId, bool bVisibility)=0
virtual void onViewportInserted(OdTrVisViewportId viewportId, int nIndex)=0
virtual void onTextureDeleted(OdTrVisTextureId textureId)=0
virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, OdUInt32 nInvalidFrom, OdUInt32 nInvalidLen, const OdTrVisDisplayId *pValidFrom, OdUInt32 nValidLen)=0
virtual void obtainClientSettings(ClientSettings &clientSets)=0
bool isSupportOverlayBuffers() const
virtual void onHlBranchModified(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef, bool bChildsModified, bool bMarkersModified)=0
bool isSupportCompositeMetafiles() const
virtual MtHandlerType mtDataTypeProcessing(DataType &type) const =0
virtual OdTrVisSharingProviderClientPtr createSharingProvider()=0
virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisDisplayId *pList, OdUInt32 nEntries)=0
virtual void onVisualStyleModified(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef)=0
bool isSupportGsStateSaving() const
virtual OdTrVisDisplayId onMetafileAdded(OdTrVisMetafileId metafileId, const OdTrVisMetafileDef &pDef)=0
virtual bool saveRenditionState(OdGsFiler *pFiler) const =0
virtual void onLayerModified(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef)=0
virtual void onViewportModified(OdTrVisViewportId viewportId, const OdTrVisViewportDef &pDef, OdUInt32 kindOfMod=kViewportModAll)=0
virtual void onOverlayVisibilityChanged(OdTrVisOverlayId overlayId, bool bVisibility)=0
bool updateShareableSectionOnly() const
virtual void onViewportDeleted(OdTrVisViewportId viewportId)=0
virtual void onDeviceUpdateEnd(OdTrVisRenderClient *pDevice)=0
virtual void onOverlayDeleted(OdTrVisOverlayId overlayId)=0
virtual void onBackgroundChanged(OdTrVisViewportId viewportId, OdTrVisFlatMetafileContainerPtr pStream, OdTrVisProgramId baseProgramId=kTrVisNegativeId)=0
virtual bool queryMetafileStream(OdTrVisDisplayId displayId, const OdTrVisFlatMetafileContainer **pStream) const =0
virtual void onOverlayRenderOrderChanged(OdTrVisOverlayId overlayId, OdInt16 nRenderOrder)=0
virtual void onPartialUpdateInvalidRects(OdTrVisOverlayId overlayId, const OdGsDCRectArray &invalidRects, bool bOverlayInvalid=false)=0
virtual void onSurfaceChanged(const OdTrVisSurfaceDef &pDef)=0
virtual IdRegistrator * idRegistrator() const =0
virtual void onMetafileFadingChanged(OdTrVisMetafileId metafileId, bool bFade)=0
virtual void onTextureAdded(OdTrVisTextureId textureId, const OdTrVisTextureDef &pDef)=0
bool isSupportVisualStyles() const
bool isSupportPartialUpdate() const
virtual void onDeviceUpdateBegin(OdTrVisRenderClient *pDevice)
OdMutexPtr m_pGlobalMutex
virtual void onLayerViewportPropsOverride(OdTrVisViewportId viewportId, OdTrVisLayerId layerId, bool bOverride, const OdTrVisLayerProps &pProps=OdTrVisLayerProps())
virtual void onBackgroundChanged(OdTrVisViewportId viewportId, OdTrVisFlatMetafileContainerPtr pStream, OdTrVisProgramId baseProgramId=kTrVisNegativeId)
virtual void onHlBranchDeleted(OdTrVisHlBranchId hlBranchId)
virtual void onDeviceUpdateEnd(OdTrVisRenderClient *pDevice)
virtual void obtainClientSettings(ClientSettings &clientSets)
virtual void onOverlayViewParamsOverride(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, bool bOverride, const OdTrVisViewParamsDef &pDef=OdTrVisViewParamsDef())
virtual void onOverlayDeleted(OdTrVisOverlayId overlayId)
virtual void onHlBranchAdded(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef)
virtual void onOverlayVisibilityChanged(OdTrVisOverlayId overlayId, bool bVisibility)
virtual void onVisualStyleModified(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef)
virtual void onMaterialAdded(OdTrVisMaterialId materialId, const OdTrVisMaterialDef &pDef)
virtual void onMetafileFadingChanged(OdTrVisMetafileId metafileId, bool bFade)
virtual void onExtentsChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisExtentsDef &pDef)
virtual void onLayerModified(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef)
virtual void onOverlayRenderOrderChanged(OdTrVisOverlayId overlayId, OdInt16 nRenderOrder)
virtual void onMetafileDeleted(OdTrVisMetafileId metafileId)
virtual OdTrVisDisplayId onMetafileAdded(OdTrVisMetafileId metafileId, const OdTrVisMetafileDef &pDef)
virtual void onMaterialDeleted(OdTrVisMaterialId materialId)
virtual void onTextureDeleted(OdTrVisTextureId textureId)
virtual void onLayerDeleted(OdTrVisLayerId layerId)
struct OdTrVisRenditionMt::DataTypeEntry m_dataTypes[kNDataTypes]
OdStaticRxObject< OdTrVisRenditionRecorder > m_recordRenditionHandler
virtual void onHlBranchModified(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef, bool bChildsModified, bool bMarkersModified)
OdStaticRxObject< OdTrVisRenditionDef > m_skipRenditionHandler
virtual void onMetafileHighlightingChanged(OdTrVisMetafileId metafileId, bool bHighlight)
virtual void onViewportAdded(OdTrVisViewportId viewportId)
virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisDisplayId *pList, OdUInt32 nEntries)
virtual void onSurfaceChanged(const OdTrVisSurfaceDef &pDef)
virtual void onVisualStyleDeleted(OdTrVisVisualStyleId visualStyleId)
OdMutexPtr m_pRecordMutex
bool isMt() const
virtual void onMetafileHlBranchDetached(OdTrVisMetafileId metafileId)
virtual bool queryMetafileStream(OdTrVisDisplayId displayId, const OdTrVisFlatMetafileContainer **pStream) const
virtual void onMetafileHlBranchAttached(OdTrVisMetafileId metafileId, OdTrVisHlBranchId hlBranchId)
virtual void onMetafileVisibilityChanged(OdTrVisMetafileId metafileId, bool bVisibility)
OdTrVisRenditionMt::IdRegistratorMt m_mtRegistrator
virtual void onOverlayAdded(OdTrVisOverlayId overlayId, const OdTrVisOverlayDef &pDef)
virtual void onLayerAdded(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef)
virtual IdRegistrator * idRegistrator() const
virtual void onTextureAdded(OdTrVisTextureId textureId, const OdTrVisTextureDef &pDef)
virtual OdTrVisProgramId queryProgramId(OdGsView::RenderMode mode, OdTrVisVisualStyleId vsId=kTrVisNegativeId, OdTrVisGeomType geomType=OdTrVisGeomType_Default, OdUInt32 shadingFlags=0) const
virtual void onLightsListChanged(OdTrVisViewportId viewportId, float ambientLight[4], bool bDefaultLightsOn, const OdTrVisLightDef *pList, OdUInt32 nEntries)
virtual void onViewportDeleted(OdTrVisViewportId viewportId)
void init(OdTrVisRendition *pRendition)
virtual void onVisualStyleAdded(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef)
virtual void onViewportInserted(OdTrVisViewportId viewportId, int nIndex)
virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, OdUInt32 nInvalidFrom, OdUInt32 nInvalidLen, const OdTrVisDisplayId *pValidFrom, OdUInt32 nValidLen)
ClientSettings m_cliSets
virtual void onViewportModified(OdTrVisViewportId viewportId, const OdTrVisViewportDef &pDef, OdUInt32 kindOfMod=kViewportModAll)
virtual void onVisualStyleModified(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef)
virtual void onVisualStyleAdded(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef)
virtual OdTrVisUniqueID * get(DataType type, OdTrVisId id, bool bKill=false) const
virtual void onViewportInserted(OdTrVisViewportId viewportId, int nIndex)
virtual void onHlBranchAdded(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef)
void playRecords(OdTrVisRendition *pRendition, bool bClear=false)
virtual void onMetafileHighlightingChanged(OdTrVisMetafileId metafileId, bool bHighlight)
virtual void reg(DataType type, OdTrVisId id, const OdTrVisUniqueID &uId)
virtual void onHlBranchModified(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef, bool bChildsModified, bool bMarkersModified)
virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisDisplayId *pList, OdUInt32 nEntries)
virtual void onMaterialAdded(OdTrVisMaterialId materialId, const OdTrVisMaterialDef &pDef)
virtual void onOverlayVisibilityChanged(OdTrVisOverlayId overlayId, bool bVisibility)
virtual void kill(DataType type, OdTrVisId id)
virtual void onHlBranchDeleted(OdTrVisHlBranchId hlBranchId)
virtual void onLayerDeleted(OdTrVisLayerId layerId)
virtual void reg(DataType type, OdTrVisId id, const OdGiDrawable *pTransId)
virtual void onSurfaceChanged(const OdTrVisSurfaceDef &pDef)
virtual void onExtentsChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisExtentsDef &pDef)
virtual void onViewportDeleted(OdTrVisViewportId viewportId)
virtual void onOverlayDeleted(OdTrVisOverlayId overlayId)
virtual void onOverlayRenderOrderChanged(OdTrVisOverlayId overlayId, OdInt16 nRenderOrder)
virtual MtHandlerType mtDataTypeProcessing(DataType &) const
virtual void onBackgroundChanged(OdTrVisViewportId viewportId, OdTrVisFlatMetafileContainerPtr pStream, OdTrVisProgramId baseProgramId=kTrVisNegativeId)
virtual void onMaterialDeleted(OdTrVisMaterialId materialId)
virtual void onTextureAdded(OdTrVisTextureId textureId, const OdTrVisTextureDef &pDef)
virtual OdTrVisRendition::IdRegistrator * idRegistrator() const
virtual void onViewportAdded(OdTrVisViewportId viewportId)
virtual void onLayerModified(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef)
virtual void onVisualStyleDeleted(OdTrVisVisualStyleId visualStyleId)
virtual OdTrVisDisplayId onMetafileAdded(OdTrVisMetafileId metafileId, const OdTrVisMetafileDef &pDef)
virtual void onOverlayViewParamsOverride(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, bool bOverride, const OdTrVisViewParamsDef &pDef=OdTrVisViewParamsDef())
virtual void onLightsListChanged(OdTrVisViewportId viewportId, float ambientLight[4], bool bDefaultLightsOn, const OdTrVisLightDef *pList, OdUInt32 nEntries)
virtual void onLayerAdded(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef)
virtual void onViewportModified(OdTrVisViewportId viewportId, const OdTrVisViewportDef &pDef, OdUInt32 kindOfMod=kViewportModAll)
virtual void onMetafileVisibilityChanged(OdTrVisMetafileId metafileId, bool bVisibility)
virtual void onTextureDeleted(OdTrVisTextureId textureId)
virtual void onMetafileHlBranchAttached(OdTrVisMetafileId metafileId, OdTrVisHlBranchId hlBranchId)
virtual void reg(DataType type, OdTrVisId id, OdDbStub *pPersId)
virtual void onMetafileFadingChanged(OdTrVisMetafileId metafileId, bool bFade)
void appendRecord(CallRecord *pRecord)
virtual void onLayerViewportPropsOverride(OdTrVisViewportId viewportId, OdTrVisLayerId layerId, bool bOverride, const OdTrVisLayerProps &pProps=OdTrVisLayerProps())
virtual void onMetafileDeleted(OdTrVisMetafileId metafileId)
virtual void onOverlayAdded(OdTrVisOverlayId overlayId, const OdTrVisOverlayDef &pDef)
virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, OdUInt32 nInvalidFrom, OdUInt32 nInvalidLen, const OdTrVisDisplayId *pValidFrom, OdUInt32 nValidLen)
virtual void onMetafileHlBranchDetached(OdTrVisMetafileId metafileId)
virtual OdTrVisSharingProviderClientPtr createSharingProvider()
virtual void onMetafileDeleted(OdTrVisMetafileId metafileId)
const OdTrVisRendition * getRedirection() const
virtual void onLayerModified(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef)
OdTrVisRendition * getInformationalRedirection()
virtual bool loadRenditionState(OdGsFiler *pFiler, OdTrVisIdMap *pIdMap)
virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, OdUInt32 nInvalidFrom, OdUInt32 nInvalidLen, const OdTrVisDisplayId *pValidFrom, OdUInt32 nValidLen)
bool hasRedirection() const
virtual void onExtentsChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisExtentsDef &pDef)
virtual void onViewportInserted(OdTrVisViewportId viewportId, int nIndex)
virtual void onMetafileHighlightingChanged(OdTrVisMetafileId metafileId, bool bHighlight)
virtual void onTextureAdded(OdTrVisTextureId textureId, const OdTrVisTextureDef &pDef)
virtual OdTrVisProgramId queryProgramId(OdGsView::RenderMode mode, OdTrVisVisualStyleId vsId=kTrVisNegativeId, OdTrVisGeomType geomType=OdTrVisGeomType_Default, OdUInt32 shadingFlags=0) const
virtual void onViewportAdded(OdTrVisViewportId viewportId)
void setRedirection(OdTrVisRendition *pRedir)
virtual void onLightsListChanged(OdTrVisViewportId viewportId, float ambientLight[4], bool bDefaultLightsOn, const OdTrVisLightDef *pList, OdUInt32 nEntries)
virtual void onVisualStyleDeleted(OdTrVisVisualStyleId visualStyleId)
virtual void onMaterialAdded(OdTrVisMaterialId materialId, const OdTrVisMaterialDef &pDef)
virtual void onLayerViewportPropsOverride(OdTrVisViewportId viewportId, OdTrVisLayerId layerId, bool bOverride, const OdTrVisLayerProps &pProps=OdTrVisLayerProps())
virtual void onBackgroundChanged(OdTrVisViewportId viewportId, OdTrVisFlatMetafileContainerPtr pStream, OdTrVisProgramId baseProgramId=kTrVisNegativeId)
virtual void onDeviceUpdateEnd(OdTrVisRenderClient *pDevice)
virtual bool queryMetafileStream(OdTrVisDisplayId displayId, const OdTrVisFlatMetafileContainer **pStream) const
virtual void onOverlayViewParamsOverride(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, bool bOverride, const OdTrVisViewParamsDef &pDef=OdTrVisViewParamsDef())
virtual void onTextureDeleted(OdTrVisTextureId textureId)
virtual void onViewportDeleted(OdTrVisViewportId viewportId)
void setRedirections(OdTrVisRendition *pRedir)
virtual void onLayerDeleted(OdTrVisLayerId layerId)
bool hasInformationalRedirection() const
OdTrVisRendition * m_pInformationalRedir
virtual void onDeviceUpdateBegin(OdTrVisRenderClient *pDevice)
virtual IdRegistrator * idRegistrator() const
virtual void onPartialUpdateList(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisDisplayId *pList, OdUInt32 nEntries)
virtual void onOverlayAdded(OdTrVisOverlayId overlayId, const OdTrVisOverlayDef &pDef)
virtual void onHlBranchAdded(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef)
virtual bool saveRenditionState(OdGsFiler *pFiler) const
virtual void onMetafileHlBranchDetached(OdTrVisMetafileId metafileId)
void setInformationalRedirection(OdTrVisRendition *pRedir)
virtual void onHlBranchModified(OdTrVisHlBranchId hlBranchId, const OdTrVisHlBranchDef &pDef, bool bChildsModified, bool bMarkersModified)
virtual void onViewportModified(OdTrVisViewportId viewportId, const OdTrVisViewportDef &pDef, OdUInt32 kindOfMod=kViewportModAll)
virtual void onOverlayRenderOrderChanged(OdTrVisOverlayId overlayId, OdInt16 nRenderOrder)
virtual void onLayerAdded(OdTrVisLayerId layerId, const OdTrVisLayerDef &pDef)
virtual void onMetafileFadingChanged(OdTrVisMetafileId metafileId, bool bFade)
virtual void querySnapshot(OdUInt8 *pScanlines, long minX, long minY, long nWidth, long nHeight)
virtual void onSurfaceChanged(const OdTrVisSurfaceDef &pDef)
OdTrVisRendition * m_pRedir
virtual void onMetafileHlBranchAttached(OdTrVisMetafileId metafileId, OdTrVisHlBranchId hlBranchId)
virtual void onVisualStyleAdded(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef)
virtual OdUInt32 queryRenditionCaps(OdUInt32 requestFor=0xFFFFFFFF) const
virtual void onVisualStyleModified(OdTrVisVisualStyleId visualStyleId, const OdTrVisVisualStyle &pDef)
OdTrVisRendition * getRedirection()
virtual void onMaterialDeleted(OdTrVisMaterialId materialId)
bool hasRedirections() const
virtual void obtainClientSettings(ClientSettings &clientSets)
virtual void onMetafileOrderChanged(OdTrVisViewportId viewportId, OdTrVisOverlayId overlayId, const OdTrVisDisplayId *pList, OdUInt32 nEntries)
virtual void onHlBranchDeleted(OdTrVisHlBranchId hlBranchId)
virtual OdTrVisDisplayId onMetafileAdded(OdTrVisMetafileId metafileId, const OdTrVisMetafileDef &pDef)
virtual MtHandlerType mtDataTypeProcessing(DataType &type) const
virtual void onMetafileVisibilityChanged(OdTrVisMetafileId metafileId, bool bVisibility)
virtual void onPartialUpdateInvalidRects(OdTrVisOverlayId overlayId, const OdGsDCRectArray &invalidRects, bool bOverlayInvalid=false)
virtual void onOverlayVisibilityChanged(OdTrVisOverlayId overlayId, bool bVisibility)
virtual void onOverlayDeleted(OdTrVisOverlayId overlayId)
const OdTrVisRendition * getInformationalRedirection() const
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OdTrVisInfoString m_glRenderer
OdTrVisInfoString m_glSLVersion
OdTrVisInfoString m_glVersion
OdTrVisInfoString m_glVendor
OdTrVisInfoString m_glExtensions
void setSupportNonPow2TexturesWrapping(bool bSet)
bool overridenLutPaletteState(bool bDeviceSetting) const
void setSupportNonPow2Textures(bool bSet)
bool overridenLutMonochromeState(bool bDeviceSetting) const
virtual void reg(DataType type, OdTrVisId id, const OdGiDrawable *pTransId)=0
virtual OdTrVisUniqueID * get(DataType type, OdTrVisId id, bool bKill=false) const =0
virtual void kill(DataType type, OdTrVisId id)=0
void reg(DataType type, OdTrVisId id, OdDbStub *pPersId, const void *pTransId)
virtual void reg(DataType type, OdTrVisId id, const OdTrVisUniqueID &uId)=0
virtual void reg(DataType type, OdTrVisId id, OdDbStub *pPersId)=0
virtual void reg(DataType, OdTrVisId, OdDbStub *)
virtual void kill(DataType, OdTrVisId)
virtual void reg(DataType, OdTrVisId, const OdGiDrawable *)
virtual void reg(DataType, OdTrVisId, const OdTrVisUniqueID &)
virtual OdTrVisUniqueID * get(DataType, OdTrVisId, bool=false) const
OdMutexPtr * m_pMutex
OdMutexPtr m_ownMutex
MtHandlerType m_handler
DataTypeEntry()
OdTrVisRendition * m_pRendition
void getset(IdRegistrator *pBaseRegistrator)
virtual void reg(DataType type, OdTrVisId id, const OdGiDrawable *pTransId)
virtual void reg(DataType type, OdTrVisId id, OdDbStub *pPersId)
OdMutexPtr m_pMutex[kNDataTypes]
virtual void kill(DataType type, OdTrVisId id)
virtual void reg(DataType type, OdTrVisId id, const OdTrVisUniqueID &uId)
virtual OdTrVisUniqueID * get(DataType type, OdTrVisId id, bool bKill=false) const
virtual void reDrop(OdTrVisRendition *pRendition)=0
const IdRegistrator * getIdRegRedirection() const
void setIdRegRedirection(IdRegistrator *pRedir)
virtual void reg(DataType type, OdTrVisId id, const OdTrVisUniqueID &uId)
virtual OdTrVisUniqueID * get(DataType type, OdTrVisId id, bool bKill=false) const
virtual void reg(DataType type, OdTrVisId id, OdDbStub *pPersId)
virtual void kill(DataType type, OdTrVisId id)
virtual void reg(DataType type, OdTrVisId id, const OdGiDrawable *pTransId)