font.h

来自「wince 3d tutorial, it has various exampl」· C头文件 代码 · 共 34 行

H
34
字号
#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 + =
减小字号Ctrl + -
显示快捷键?