📄 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"
class BitmappedFont
{
public:
BitmappedFont(GLuint textureFontID, int fontWidth = 15, int fontHeight = 15);
~BitmappedFont();
static void EnableStates(); //Begin Print
void Print(int x, int y, const char *fmt, ...);
static void DisableStates(); //EndPrint
private:
GLuint m_textureFontID;
int m_fontWidth,m_fontHeight;
//I've decided make this array static because will be exactly the same data for all fonts we will use
static GLfixed m_textureCoordinates[2 * 4 * 8 * 16]; //2 = st, 4 = vertices per character, 8 = rows, 16 = columns
static bool m_instanced;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -