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

Last change on this file since 1499 was 1499, checked in by sam, 9 years ago

neercs: move TextRender to its own file.

  • Property svn:keywords set to Id
File size: 652 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(ivec2 screen_size);
12    void Render(ivec2 fbo_size);
13    void Blit(ivec2 fbo_size, ivec2 pos, ivec2 size);
14
15private:
16    caca_canvas_t *m_caca;
17    ivec2 m_font_size, m_canvas_size;
18    int m_cells;
19
20    Array<vec2> m_vertices;
21    TileSet *m_font;
22    Shader *m_shader;
23    ShaderAttrib m_coord, m_color, m_char;
24    ShaderUniform m_texture, m_transform;
25    VertexDeclaration *m_vdecl;
26    VertexBuffer *m_vbo1, *m_vbo2, *m_vbo3;
27    FrameBuffer *m_fbo;
28};
29
30#endif // __TEXT_RENDER_H__
31
Note: See TracBrowser for help on using the repository browser.