[ExecString] combine SplitParameters with identical function of CUtil
[xbmc.git] / xbmc / guilib / GUIFontTTFGL.h
blob22fbe6419b81c13d1cac0d9172573805af7949f2
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "GUIFontTTF.h"
13 #include <string>
14 #include <vector>
16 #include "system_gl.h"
18 class CGUIFontTTFGL : public CGUIFontTTF
20 public:
21 explicit CGUIFontTTFGL(const std::string& fontIdent);
22 ~CGUIFontTTFGL(void) override;
24 bool FirstBegin() override;
25 void LastEnd() override;
27 CVertexBuffer CreateVertexBuffer(const std::vector<SVertex>& vertices) const override;
28 void DestroyVertexBuffer(CVertexBuffer& bufferHandle) const override;
29 static void CreateStaticVertexBuffers(void);
30 static void DestroyStaticVertexBuffers(void);
32 protected:
33 std::unique_ptr<CTexture> ReallocTexture(unsigned int& newHeight) override;
34 bool CopyCharToTexture(FT_BitmapGlyph bitGlyph,
35 unsigned int x1,
36 unsigned int y1,
37 unsigned int x2,
38 unsigned int y2) override;
39 void DeleteHardwareTexture() override;
41 static GLuint m_elementArrayHandle;
43 private:
44 unsigned int m_updateY1{0};
45 unsigned int m_updateY2{0};
47 enum TextureStatus
49 TEXTURE_VOID = 0,
50 TEXTURE_READY,
51 TEXTURE_REALLOCATED,
52 TEXTURE_UPDATED,
55 TextureStatus m_textureStatus{TEXTURE_VOID};
57 static bool m_staticVertexBufferCreated;