glfont.h

来自「实战粒子系统例程」· C头文件 代码 · 共 40 行

H
40
字号
/*
	gltext.h - Font class
	Copyright (c) HalfLucifer, 2001.6.15
*/#ifndef __GLFONTH__#define __GLFONTH__
#include "gltexture.h"

extern HWND hWnd;					// Window Handle
class GLfont{

protected:
	GLuint		base;				// Base for display list
	GLtexture	FontTexture;		// Font texture
	char		text[256];			// Text buffer
	GLint		MatrixMode;
	GLint		PolygonMode;
	GLboolean	DepthOn;
	GLboolean	LightingOn;
	GLboolean	TextureOn;
	GLboolean	ScissorOn;
	GLboolean	BlendOn;
	GLint		BlendSrc;
	GLint		BlendDst;

public:
	RECT		Viewport;
	GLfont() {}
	~GLfont() { glDeleteLists(base, 95); }
	bool Initialize(char *filename);
	GLvoid Print(GLint xpos, GLint ypos, const char *string, ...);
    GLvoid GetStates(GLvoid);
    GLvoid SetStates(GLvoid);

};
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?