X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fscreen.h;h=a034d2a12a0309c502865a5bf395d49f1527a30a;hp=f66c7aa762e140c5d5d4b7798155b982f9945a2f;hb=8942bd699d8e1ddede1127421ad18bed53232ff3;hpb=6229c121e63cf53459cf82cb1eaa8af063da592a diff --git a/src/screen.h b/src/screen.h index f66c7aa..a034d2a 100644 --- a/src/screen.h +++ b/src/screen.h @@ -59,6 +59,8 @@ namespace IPDF void ScreenShot(const char * filename) const; void RenderBMP(const char * filename) const; + void RenderPixels(int x, int y, int w, int h, uint8_t * pixels) const; + // Returns the CPU time (in seconds) it took to render the last completed frame. double GetLastFrameTimeCPU() const { return m_last_frame_time / SDL_GetPerformanceFrequency(); } @@ -82,6 +84,7 @@ namespace IPDF SDL_Window *m_window; SDL_GLContext m_gl_context; ShaderProgram m_texture_prog; + ShaderProgram m_font_prog; GLint m_colour_uniform_location; GraphicsBuffer m_viewport_ubo; stbtt_bakedchar m_debug_font_rects[96];