add a log
This commit is contained in:
parent
fc77fef9a7
commit
f8da258442
BIN
libfxengine.a
BIN
libfxengine.a
Binary file not shown.
|
@ -1,24 +1,36 @@
|
|||
#define GINT_NEED_VRAM
|
||||
|
||||
#include <gint/display.h>
|
||||
#include <stdint.h>
|
||||
#include <fxengine/fxengine.h>
|
||||
#ifdef USE_LIBPROF
|
||||
#include <libprof.h>
|
||||
#endif
|
||||
#include <gint/std/stdlib.h>
|
||||
#include <gint/std/string.h>
|
||||
#include <stdbool.h>
|
||||
#include <fxengine/renderlist.h>
|
||||
#include <fxengine/render/buffer.h>
|
||||
#ifdef USE_LIBLOG
|
||||
#include <liblog.h>
|
||||
#endif
|
||||
|
||||
|
||||
// FPS count
|
||||
#ifdef USE_LIBPROF
|
||||
|
||||
#include <libprof.h>
|
||||
|
||||
static uint32_t frame_interval_min=1000000;
|
||||
|
||||
static uint32_t frame_interval_max=1;
|
||||
|
||||
static uint32_t fps=0;
|
||||
#endif
|
||||
|
||||
uint32_t fe_get_fps()
|
||||
{return fps;}
|
||||
{
|
||||
return fps;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// Triple buffering
|
||||
#define BUFFER_SIZE 256
|
||||
|
@ -36,7 +48,6 @@ static void check_vram()
|
|||
void fe_callback_start()
|
||||
{
|
||||
vram=gint_vram;
|
||||
memcpy(gint_vram, temp_buffers[1-working_buffer], sizeof(uint32_t)*BUFFER_SIZE);
|
||||
}
|
||||
|
||||
void fe_callback_end()
|
||||
|
@ -60,16 +71,36 @@ static volatile bool quit=true;
|
|||
|
||||
void fe_load()
|
||||
{
|
||||
#ifdef USE_LIBLOG
|
||||
ll_send("fxEngine loader :\n");
|
||||
#endif
|
||||
check_vram();
|
||||
#ifdef USE_LIBLOG
|
||||
ll_send(">> Got vram\n");
|
||||
#endif
|
||||
fe_callback_end();
|
||||
#ifdef USE_LIBLOG
|
||||
ll_send(">> Started triple \n buffering\n");
|
||||
#endif
|
||||
|
||||
quit=false;
|
||||
#ifdef USE_LIBLOG
|
||||
ll_send("run fxEng. thread\n");
|
||||
#endif
|
||||
while (1)
|
||||
{
|
||||
fe_clear_zbuffer();
|
||||
fe_render();
|
||||
#ifdef USE_LIBLOG
|
||||
ll_send("Frame rendered.\n");
|
||||
#endif
|
||||
switch_frame();
|
||||
if (quit)
|
||||
break;
|
||||
}
|
||||
#ifdef USE_LIBLOG
|
||||
ll_send("ended fxEngine.\n");
|
||||
#endif
|
||||
// Free some malloc
|
||||
//// as object list
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue