X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fscreen.h;h=9666c3259718f0db655f392a63b17889ff3d498d;hp=f2a98c2abff72c37b4d38a7c85f83cff83addb67;hb=e297312c8c82e52abd3507c861e85db497ca7e81;hpb=f8ef964f021d1d6da6ea46bbb1fe8f0250a5be8c diff --git a/src/screen.h b/src/screen.h index f2a98c2..9666c32 100644 --- a/src/screen.h +++ b/src/screen.h @@ -59,7 +59,9 @@ namespace IPDF void ScreenShot(const char * filename) const; void RenderBMP(const char * filename) const; - void RenderPixels(int x, int y, int w, int h, void * pixels) 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(); } @@ -83,6 +85,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];