CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GsUpdateManager.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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
24#ifndef __ODGSUPDATEMANAGER_H__
25#define __ODGSUPDATEMANAGER_H__
26
27class OdDbStub;
28class OdGsEntityNode;
29class OdRxObject;
30class OdGsViewImpl;
31
32#include "Gs/GsExport.h"
33#include "Ge/GeExtents3d.h"
34#define STL_USING_MAP
35#include <map>
36#include "TD_PackPush.h"
37
45{
46public:
48
53 {
54 kKeepDrawOrder = 0, //Keep draw order
55 kFilterByLimit = (1 << 0) //Filtration by memory limit (CLOUD)
56 };
57
61 enum Action
62 {
65 kNoChanges
66 };
67
69 {
70 protected:
71 std::map< OdUInt32, OdUInt8 > m_stateFlags;
72 //OdUInt8 m_stateFlags;
73 public:
75 OdUInt8 state( OdUInt32 vpId ) const
76 {
77 std::map< OdUInt32, OdUInt8 >::const_iterator it = m_stateFlags.find( vpId );
78 if( it != m_stateFlags.end() )
79 {
80 return it->second;
81 }
82 return 0;
83 }
84 void setState( OdUInt8 state, OdUInt32 vpId )
85 {
86 m_stateFlags[ vpId ] = state;
87 }
88 };
89
99 typedef void (*UpdateManagerProcessCallback)( Action action, OdUInt32 viewportId, OdDbStub* drawableId, OdGsEntityNode* pNode, OdGsUpdateManagerElement* pElement );
100
105 {
110 };
111
112public:
116 virtual UpdateManagerSettings settings() const = 0;
117
121 virtual void setSettings( const UpdateManagerSettings& ) = 0;
122
130 virtual void addElement( OdUInt32 viewportId, OdGsEntityNode* pNode, OdGsUpdateManagerElement* pElement ) = 0;
131
143 virtual void addElement( OdUInt32 viewportId, OdGsEntityNode* pNode, OdGsUpdateManagerElement* pElement, OdUInt64 nLength, OdGsViewImpl* pView, const OdGeExtents3d& extents, bool bSetZeroWeight = false ) = 0;
144
148 virtual void addPriorityElement( OdUInt32 viewportId, OdGsEntityNode* pNode, OdGsUpdateManagerElement* pElement, OdUInt64 nLength ) = 0;
149
153 virtual void setProcessCallback( UpdateManagerProcessCallback ) = 0;
154
158 virtual void process() = 0;
159
163 virtual void reset() = 0;
164
171 virtual void removeElement( OdUInt32 viewportId, OdGsEntityNode* pNode, OdGsUpdateManagerElement* pElement ) = 0;
172};
173
174#include "TD_PackPop.h"
175
176#endif // __ODGSUPDATEMANAGER_H__
#define GS_TOOLKIT_EXPORT
Definition: GsExport.h:37
unsigned int OdUInt32
unsigned char OdUInt8
std::map< OdUInt32, OdUInt8 > m_stateFlags
void setState(OdUInt8 state, OdUInt32 vpId)
virtual void process()=0
virtual void addElement(OdUInt32 viewportId, OdGsEntityNode *pNode, OdGsUpdateManagerElement *pElement)=0
virtual void addElement(OdUInt32 viewportId, OdGsEntityNode *pNode, OdGsUpdateManagerElement *pElement, OdUInt64 nLength, OdGsViewImpl *pView, const OdGeExtents3d &extents, bool bSetZeroWeight=false)=0
virtual UpdateManagerSettings settings() const =0
virtual void setSettings(const UpdateManagerSettings &)=0
virtual void addPriorityElement(OdUInt32 viewportId, OdGsEntityNode *pNode, OdGsUpdateManagerElement *pElement, OdUInt64 nLength)=0
virtual void reset()=0
ODRX_DECLARE_MEMBERS(OdGsUpdateManager)
virtual void setProcessCallback(UpdateManagerProcessCallback)=0
virtual void removeElement(OdUInt32 viewportId, OdGsEntityNode *pNode, OdGsUpdateManagerElement *pElement)=0
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)