File indexing completed on 2025-01-18 10:04:35
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef OpenGl_TextBuilder_Header
0017 #define OpenGl_TextBuilder_Header
0018
0019 #include <OpenGl_Font.hxx>
0020 #include <OpenGl_VertexBuffer.hxx>
0021 #include <OpenGl_VertexBufferEditor.hxx>
0022 #include <OpenGl_Vec.hxx>
0023
0024 #include <NCollection_Vector.hxx>
0025 #include <NCollection_Handle.hxx>
0026
0027 class Font_TextFormatter;
0028
0029
0030 class OpenGl_TextBuilder
0031 {
0032 public:
0033
0034
0035 Standard_EXPORT OpenGl_TextBuilder();
0036
0037
0038 Standard_EXPORT void Perform (const Handle(Font_TextFormatter)& theFormatter,
0039 const Handle(OpenGl_Context)& theContext,
0040 OpenGl_Font& theFont,
0041 NCollection_Vector<GLuint>& theTextures,
0042 NCollection_Vector<Handle(OpenGl_VertexBuffer)>& theVertsPerTexture,
0043 NCollection_Vector<Handle(OpenGl_VertexBuffer)>& theTCrdsPerTexture);
0044
0045 protected:
0046
0047 Standard_EXPORT void createGlyphs (const Handle(Font_TextFormatter)& theFormatter,
0048 const Handle(OpenGl_Context)& theCtx,
0049 OpenGl_Font& theFont,
0050 NCollection_Vector<GLuint>& theTextures,
0051 NCollection_Vector< NCollection_Handle < NCollection_Vector <OpenGl_Vec2> > >& theVertsPerTexture,
0052 NCollection_Vector< NCollection_Handle < NCollection_Vector <OpenGl_Vec2> > >& theTCrdsPerTexture);
0053
0054 protected:
0055
0056 NCollection_Vector<OpenGl_Font::Tile> myTileRects;
0057 OpenGl_VertexBufferEditor<OpenGl_Vec2> myVboEditor;
0058 };
0059
0060 #endif