Added gfxGetFramebufferSize().

This commit is contained in:
yellows8 2017-12-17 23:04:27 -05:00
parent c80096e5cc
commit e871eb9695
2 changed files with 5 additions and 0 deletions

View File

@ -13,6 +13,7 @@ void gfxExit(void);
void gfxWaitForVsync();
void gfxSwapBuffers();
u8* gfxGetFramebuffer(u32* width, u32* height);
size_t gfxGetFramebufferSize(void); /// Use this to get the actual byte-size of the buffer for use with memset/etc, do not calculate the byte-size manually with the width and height from gfxGetFramebuffer. The height returned by gfxGetFramebuffer is the display height not the aligned height.
void gfxSetDoubleBuffering(bool doubleBuffering);
void gfxFlushBuffers(void);

View File

@ -326,6 +326,10 @@ u8* gfxGetFramebuffer(u32* width, u32* height) {
return &g_gfxFramebuf[g_gfxCurrentBuffer*g_nvgfx_singleframebuf_size];
}
size_t gfxGetFramebufferSize(void) {
return g_nvgfx_singleframebuf_size;
}
void gfxSetDoubleBuffering(bool doubleBuffering) {
g_gfxDoubleBuf = doubleBuffering;
}