📄 font.h
字号:
#ifndef FONT_H
#define FONT_H
#include <windows.h>
#include <stdarg.h>
#include <stdio.h>
#include <GLES/gl.h>
#include <GLES/egl.h>
#include "fixed.h"
#include "texture.h"
class BitmappedFont
{
public:
BitmappedFont(const char *textureFont, int fontWidth = 15, int fontHeight = 15);
~BitmappedFont();
static void EnableStates(); //Enable all needed states to print the text, but does not set the ortho2D mode
void Print(int x, int y, const char *fmt, ...);
static void DisableStates(); //Disable states actived by EnableStates()
inline bool GetState() const {return m_state;};
inline const Texture *GetTexture() const {return m_texture;};
private:
bool m_state;
Texture *m_texture;
int m_fontWidth,m_fontHeight;
static GLfixed m_textureCoordinates[2 * 4 * 8 * 16];
static bool m_instanced;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -