1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-30 08:24:05 +00:00
GLideN64/src/TextDrawer.h

31 lines
554 B
C
Raw Normal View History

#ifndef TEXTDRAWER_H
#define TEXTDRAWER_H
#include <memory>
#include "Graphics/ShaderProgram.h"
#include "Graphics/FramebufferTextureFormats.h"
struct Atlas;
class TextDrawer
{
public:
void init();
void destroy();
void drawText(const char *_pText, float x, float y) const;
void getTextSize(const char *_pText, float & _w, float & _h) const;
2017-05-26 09:00:01 +00:00
void setTextColor(float * _color);
private:
std::unique_ptr<Atlas> m_atlas;
2017-05-26 09:00:01 +00:00
std::unique_ptr<graphics::TextDrawerShaderProgram> m_program;
};
extern TextDrawer g_textDrawer;
#endif // TEXTDRAWER_H