add stats with f4 toggle
This commit is contained in:
parent
a29a6018b8
commit
8c0777b547
7 changed files with 88 additions and 36 deletions
|
|
@ -19,6 +19,9 @@
|
|||
#include "pxl8_sys.h"
|
||||
#include "pxl8_types.h"
|
||||
|
||||
void pxl8_renderer_update_stats(pxl8_renderer* r, f32 dt);
|
||||
pxl8_gfx_stats* pxl8_renderer_get_stats(pxl8_renderer* r);
|
||||
|
||||
#define PXL8_MAX_TARGET_STACK 8
|
||||
|
||||
typedef struct pxl8_sprite_cache_entry {
|
||||
|
|
@ -1043,3 +1046,11 @@ bool pxl8_gfx_get_wireframe(const pxl8_gfx* gfx) {
|
|||
u8 pxl8_gfx_get_ambient(const pxl8_gfx* gfx) {
|
||||
return gfx ? gfx->frame.uniforms.ambient : 0;
|
||||
}
|
||||
|
||||
const pxl8_gfx_stats* pxl8_gfx_get_stats(const pxl8_gfx* gfx) {
|
||||
return gfx ? pxl8_renderer_get_stats(gfx->renderer) : NULL;
|
||||
}
|
||||
|
||||
void pxl8_gfx_update_stats(pxl8_gfx* gfx, f32 dt) {
|
||||
if (gfx) pxl8_renderer_update_stats(gfx->renderer, dt);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue