You've already forked flecs_tests
Add flecs
This commit is contained in:
@@ -3,15 +3,20 @@
|
||||
// Includes Sokol GFX, Sokol GP and Sokol APP, doing all implementations.
|
||||
#define SOKOL_IMPL
|
||||
#define SOKOL_GLES3
|
||||
#define FLECS_CUSTOM_BUILD
|
||||
#include "sokol_gfx.h"
|
||||
#include "sokol_gp.h"
|
||||
#include "sokol_app.h"
|
||||
#include "sokol_glue.h"
|
||||
|
||||
#include "flecs.c"
|
||||
|
||||
#include <stdio.h> // for fprintf()
|
||||
#include <stdlib.h> // for exit()
|
||||
#include <math.h> // for sinf() and cosf()
|
||||
|
||||
ecs_world_t *world;
|
||||
|
||||
// Called on every frame of the application.
|
||||
static void frame(void) {
|
||||
// Get current window size.
|
||||
@@ -68,10 +73,14 @@ static void init(void) {
|
||||
fprintf(stderr, "Failed to create Sokol GP context: %s\n", sgp_get_error_message(sgp_get_last_error()));
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
world = ecs_init();
|
||||
}
|
||||
|
||||
// Called when the application is shutting down.
|
||||
static void cleanup(void) {
|
||||
ecs_fini(world);
|
||||
|
||||
// Cleanup Sokol GP and Sokol GFX resources.
|
||||
sgp_shutdown();
|
||||
sg_shutdown();
|
||||
|
||||
Reference in New Issue
Block a user