X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fscreen.h;h=d918dd1afc2a9fd0b604b46468939d1e4c247c7f;hp=66590e717bd238046d30b27f3ac18cbe08ebf70e;hb=a851cf197844a2eb15fd5ee2c350ee296e415dca;hpb=700f1449af19115ff2bbe50ad67ea7c73f9aa5cd diff --git a/src/screen.h b/src/screen.h index 66590e7..d918dd1 100644 --- a/src/screen.h +++ b/src/screen.h @@ -6,6 +6,8 @@ #include #include "stb_truetype.h" +#include "graphicsbuffer.h" +#include "shaderprogram.h" namespace IPDF { @@ -59,6 +61,7 @@ namespace IPDF void RenderBMP(const char * filename) const; private: void ResizeViewport(int width, int height); + void DebugFontFlush(); MouseHandler m_mouse_handler; int m_last_mouse_x; @@ -68,11 +71,18 @@ namespace IPDF int m_viewport_height; SDL_Window *m_window; SDL_GLContext m_gl_context; + ShaderProgram m_texture_prog; + GLint m_colour_uniform_location; + GraphicsBuffer m_viewport_ubo; stbtt_bakedchar m_debug_font_rects[96]; unsigned int m_debug_font_atlas; float m_debug_font_x; float m_debug_font_y; float m_debug_font_size; + GraphicsBuffer m_debug_font_vertices; + GraphicsBuffer m_debug_font_indices; + int m_debug_font_vertex_head; + int m_debug_font_index_head; }; }