Files
khaotic-engine-Reborn/enginecustom/src/inc/system/text_class.h

47 lines
1.2 KiB
C++

#ifndef _TEXTCLASS_H_
#define _TEXTCLASS_H_
///////////////////////
// MY CLASS INCLUDES //
///////////////////////
#include "font_class.h"
////////////////////////////////////////////////////////////////////////////////
// Class name: text_class
////////////////////////////////////////////////////////////////////////////////
class text_class
{
private:
struct VertexType
{
XMFLOAT3 position;
XMFLOAT2 texture;
};
public:
text_class();
text_class(const text_class&);
~text_class();
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, int, int, int, font_class*, char*, int, int, float, float, float);
void Shutdown();
void Render(ID3D11DeviceContext*);
int GetIndexCount();
bool UpdateText(ID3D11DeviceContext*, font_class*, char*, int, int, float, float, float);
XMFLOAT4 GetPixelColor();
private:
bool InitializeBuffers(ID3D11Device*, ID3D11DeviceContext*, font_class*, char*, int, int, float, float, float);
void ShutdownBuffers();
void RenderBuffers(ID3D11DeviceContext*);
private:
ID3D11Buffer* m_vertexBuffer, * m_indexBuffer;
int m_screenWidth, m_screenHeight, m_maxLength, m_vertexCount, m_indexCount;
XMFLOAT4 m_pixelColor;
};
#endif