source: trunk/tools/neercs/video/text-render.h @ 1627

Last change on this file since 1627 was 1627, checked in by sam, 8 years ago

neercs: handle caca canvas size changes automatically.

  • Property svn:keywords set to Id
File size: 616 bytes
Line 
1//
2// Neercs
3//
4
5#if !defined __TEXT_RENDER_H__
6#define __TEXT_RENDER_H__
7
8struct TextRender
9{
10    TextRender(caca_canvas_t *caca, ivec2 font_size);
11    void Init();
12    void Render();
13    void Blit(ivec2 pos, ivec2 size);
14
15private:
16    void CreateBuffers();
17
18    caca_canvas_t *m_caca;
19    ivec2 m_font_size, m_canvas_size, m_fbo_size;
20    int m_cells;
21
22    TileSet *m_font;
23    Shader *m_shader;
24    ShaderAttrib m_coord, m_color, m_char;
25    ShaderUniform m_texture, m_transform;
26    VertexDeclaration *m_vdecl;
27    VertexBuffer *m_vbo1, *m_vbo2, *m_vbo3;
28    FrameBuffer *m_fbo;
29};
30
31#endif // __TEXT_RENDER_H__
32
Note: See TracBrowser for help on using the repository browser.