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

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

neercs: added a better check for forkpty(), and moved the GL_POINTS
size and texture logic to the vertex shader.

  • Property svn:keywords set to Id
File size: 631 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
24    Shader *m_shader;
25    ShaderAttrib m_coord, m_color, m_char;
26    ShaderUniform m_texture, m_transform, m_pointsize;
27    VertexDeclaration *m_vdecl;
28    VertexBuffer *m_vbo1, *m_vbo2, *m_vbo3;
29
30    FrameBuffer *m_fbo;
31};
32
33#endif // __TEXT_RENDER_H__
34
Note: See TracBrowser for help on using the repository browser.