35 lines
576 B
C
35 lines
576 B
C
#pragma once
|
|
|
|
#include <EGL/egl.h>
|
|
#include <EGL/eglext.h>
|
|
|
|
/**
|
|
* Our saved state data.
|
|
*/
|
|
struct saved_state {
|
|
float angle;
|
|
int32_t x;
|
|
int32_t y;
|
|
EGLDisplay display;
|
|
EGLContext context;
|
|
};
|
|
|
|
/**
|
|
* Shared state for our app.
|
|
*/
|
|
struct engine {
|
|
struct android_app* app;
|
|
|
|
ASensorManager* sensorManager;
|
|
const ASensor* accelerometerSensor;
|
|
ASensorEventQueue* sensorEventQueue;
|
|
|
|
int animating;
|
|
EGLDisplay display;
|
|
EGLSurface surface;
|
|
EGLContext context;
|
|
int32_t width;
|
|
int32_t height;
|
|
struct saved_state state;
|
|
};
|