VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTexturedGlyphRenderer.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2022 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
15 
16 #include <vrvMath/DtVector4.h>
17 
18 #include <tbb/tbb_allocator.h>
19 
20 #include <unordered_map>
21 #include <vector>
22 
23 namespace makVrv
24 {
25 
29  {
30  public:
31 
33  {
34  // Each quad has a position.
35  std::vector<Vector4_32> myQuadPositions;
36 
37  // Each quad (glyph) has its own texture.
38  // Each index indexes into the global array of all textures
39  // Each index in the global array is a bindless address of the texture therein
40  std::vector<int> myQuadTextureIndexes;
41 
42  // Each quad has 4 vertices. There are a total of myPositions.size() quads
43  // So, a total of myPositions.size()*4 vertices
44  std::vector< DtOffsetRotationColorTextureCoordinate, tbb::tbb_allocator<DtOffsetRotationColorTextureCoordinate> > myQuadVertices;
45  };
46  public:
47 
50 
52  virtual ~DtTexturedGlyphRenderer();
53 
57  virtual void renderGlyph( const DtPen& pen, const DtGlyph& glyph
58  , int group, const float position[4], float rotation
59  , int& vertexIndex, int textureIndex);
60  virtual void renderGlyphWithRightToLeft(const DtPen& pen, const DtGlyph& glyph, bool rightToLeft
61  , int group, const float position[4], float rotation
62  , int& vertexIndex, int textureIndex);
63 
65 
66  };
67 
68 }
A glyph renderer which renders the texture associated with a glyph.
Definition: DtTexturedGlyphRenderer.h:28
std::vector< int > myQuadTextureIndexes
Definition: DtTexturedGlyphRenderer.h:40
Abstract class for handling glyph rendering.
Definition: DtGlyphRenderer.h:21
4 dimensional vector
A class which represents a glyph instance. A font is made up of glyphs.
Definition: DtGlyph.h:21
QuadVertexList myQuadVertexList
Definition: DtTexturedGlyphRenderer.h:64
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
std::vector< DtOffsetRotationColorTextureCoordinate, tbb::tbb_allocator< DtOffsetRotationColorTextureCoordinate > > myQuadVertices
Definition: DtTexturedGlyphRenderer.h:44
Contains makVrv::DtGlyphRenderer class.
Definition: DtTexturedGlyphRenderer.h:32
std::vector< Vector4_32 > myQuadPositions
Definition: DtTexturedGlyphRenderer.h:35
A pen object with parameters on how to draw text.
Definition: DtBoundingBox.h:80
Contains the makVrv::DtTextured2DRenderer class declaration.
Contains the makVrv::DtOffsetColoredTexturedVertex class declaration.

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)