File indexing completed on 2026-09-29 09:20:02
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_DynamicArray.hxx>
0025 #include <NCollection_Handle.hxx>
0026
0027 class Font_TextFormatter;
0028
0029
0030
0031 class OpenGl_TextBuilder
0032 {
0033 public:
0034
0035 Standard_EXPORT OpenGl_TextBuilder();
0036
0037
0038 Standard_EXPORT void Perform(
0039 const occ::handle<Font_TextFormatter>& theFormatter,
0040 const occ::handle<OpenGl_Context>& theContext,
0041 OpenGl_Font& theFont,
0042 NCollection_DynamicArray<GLuint>& theTextures,
0043 NCollection_DynamicArray<occ::handle<OpenGl_VertexBuffer>>& theVertsPerTexture,
0044 NCollection_DynamicArray<occ::handle<OpenGl_VertexBuffer>>& theTCrdsPerTexture);
0045
0046 protected:
0047 Standard_EXPORT void createGlyphs(
0048 const occ::handle<Font_TextFormatter>& theFormatter,
0049 const occ::handle<OpenGl_Context>& theCtx,
0050 OpenGl_Font& theFont,
0051 NCollection_DynamicArray<GLuint>& theTextures,
0052 NCollection_DynamicArray<NCollection_Handle<NCollection_DynamicArray<NCollection_Vec2<float>>>>&
0053 theVertsPerTexture,
0054 NCollection_DynamicArray<NCollection_Handle<NCollection_DynamicArray<NCollection_Vec2<float>>>>&
0055 theTCrdsPerTexture);
0056
0057 protected:
0058 NCollection_DynamicArray<OpenGl_Font::Tile> myTileRects;
0059 OpenGl_VertexBufferEditor<NCollection_Vec2<float>> myVboEditor;
0060 };
0061
0062 #endif