VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTextRenderer.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2023 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
14 #include <vrvCore/DtBoundingBox.h>
18 
19 #include <vrvGraphics/DtFont.h>
20 
22 
23 #include <vrvUtil/DtUnicode.h>
24 
25 #include <matrix/vlMath.h>
26 
27 #include <utility>
28 #include <vector>
29 #include <limits>
30 
31 namespace makVrv
32 {
33 
34  class DtDe;
35  class Dt2DEffect;
36  class DtTextProxy;
37  class DtTextLayoutInterface;
38  class DtTexturedGlyphRenderer;
39  class DtOverlayResourceProvider;
40  class DtProjected2DTexturedEffect;
41  class DtTextProxyGroup;
42  struct DtObserverRenderData;
43  struct DtOverlayRenderData;
44  class DtBufferObject;
45 
48 
51 
53  template <>
54  inline const char* creatorTypeName<DtTextRenderer>(void) { return "DtTextRendererCreator"; }
55 
59  {
61 
62  public:
63 
65  virtual ~DtTextRenderer();
66 
68  DtTextRenderer() = delete;
69 
72  const DtTextRenderer &other) = delete;
73 
75  DtTextRenderer &operator=(
76  const DtTextRenderer &other) = delete;
77 
78  public:
79 
81  virtual DtTextProxy* createProxy();
82 
84  virtual DtTextProxy* cloneProxy( const DtTextProxy* );
85 
87  virtual int numberOfPrimitives() const;
88 
90  virtual void releaseResources();
91 
93  virtual bool isRenderModeSupported( int mode );
94 
95  virtual bool forceTextShaping(void) const;
96 
98  virtual void render(const DtOverlayRenderData& overlayRenderData,
99  const DtObserverRenderData& channelRenderData,
100  const double projectionMatrix[16]);
101 
103  virtual void addGroupRef( unsigned int );
104 
106  virtual void removeGroupRef( unsigned int );
107 
110  virtual void removeProxy( const DtTextProxy* );
111 
124  virtual void setAltitudeBasedConfigurationsForProxy(DtTextProxy*, const DtAltitudeBasedConfigurationCollection&);
125 
127  virtual bool getAltitudeBasedConfigurationsForProxy(const DtTextProxy*, DtAltitudeBasedConfigurationCollection&) const;
128 
130  virtual void clearAltitudeSpecificConfigurationsForProxy(DtTextProxy*);
131 
132  protected:
133 
136 
138  virtual void resizeNumOfBufferObjectsIfNecessary(int newNumber);
139 
141  virtual void uploadData(DtBufferObject* bufferObject, size_t sizeInBytes, const void* data);
142 
144  virtual void deleteBufferObjectsAndClearList(void);
145 
146  protected:
147 
148  std::map<const DtTextProxy*, DtTextProxyGroup*> myTextProxyToGroupMap;
149  std::map<const DtTextProxyGroup*, DtTexturedGlyphRenderer*> myGlyphRenderers;
150  std::vector<DtTextProxyGroup*> myTextProxyGroups;
152 
154  {
156  ~BuffersContainer();
157 
158  DtBufferObject* myQuadPositions = nullptr;
159  DtBufferObject* myQuadVertices = nullptr;
160  DtBufferObject* myQuadIndexOffsets = nullptr;
161 
162  DtBufferObject* myQuadTextureIndexes = nullptr;
163  DtBufferObject* myGpuTexturesBuffer = nullptr;
164  };
165  typedef std::vector< BuffersContainer* > BufferObjectList;
167  };
168 }
DtProjected2DTexturedEffect * myEffect
Definition: DtTextRenderer.h:151
Contains the makVrv::DtBoundingBox class declaration.
A class the wraps a OpenGL Array Buffer object.
Definition: DtBufferObject.h:17
A class for controlling text owned by the TextRenderer.
Definition: DtTextProxy.h:33
BufferObjectList myBufferObjectList
Definition: DtTextRenderer.h:166
A extended precision 2D quad rendering effect.
Definition: DtProjected2DTexturedEffect.h:18
Contains makVrv::DtAltitudeBasedConfiguration class.
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
A class for rendering text object.
Definition: DtTextRenderer.h:58
The overlay resource provider class provides resources for overlay drawing classes.
Definition: DtOverlayResourceProvider.h:28
const char * creatorTypeName< DtTextRenderer >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtTextRenderer.h:54
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
std::vector< DtTextProxyGroup * > myTextProxyGroups
Definition: DtTextRenderer.h:150
Abstract primitive rendering base class.
Definition: DtPrimitiveRenderer.h:19
std::vector< BuffersContainer * > BufferObjectList
Definition: DtTextRenderer.h:165
DtVirtualBaseClassCreator< DtTextRenderer, DtOverlayResourceProvider & > DtTextRendererCreator
creator
Definition: DtTextRenderer.h:47
A structure to hold rendering information for overlays. This is used to pass to various overlay rende...
Definition: DtCommonRenderData.h:43
Contains makVrv::DtAltitudeBasedBoundingBoxConfiguration class.
Definition: DtTextRenderer.h:153
const char int mode
Definition: ioapi.h:38
Contains makVrv::DtFont class.
std::map< const DtTextProxyGroup *, DtTexturedGlyphRenderer * > myGlyphRenderers
Definition: DtTextRenderer.h:149
Contains the makVrv::DtTextured2DRenderer class declaration.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
friend DtTextRendererCreator
Definition: DtTextRenderer.h:60
std::map< const DtTextProxy *, DtTextProxyGroup * > myTextProxyToGroupMap
Definition: DtTextRenderer.h:148
Definition: DtCommonRenderData.h:33
std::vector< DtAltitudeBasedConfiguration > DtAltitudeBasedConfigurationCollection
A collection of altitude-based configurations for a text proxy.
Definition: DtAltitudeBasedConfiguration.h:42

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)