28 lines
675 B
C
28 lines
675 B
C
#ifndef SHROOMS_VB_NATIVE_GRAPHICS_
|
|
#define SHROOMS_VB_NATIVE_GRAPHICS_
|
|
|
|
#include <SDL2/SDL.h>
|
|
#include <nuklear.h>
|
|
|
|
typedef struct {
|
|
SDL_Window *window;
|
|
SDL_Renderer *renderer;
|
|
SDL_Texture *leftEye;
|
|
SDL_Texture *rightEye;
|
|
struct nk_context *nk;
|
|
struct nk_font *font;
|
|
} GraphicsContext;
|
|
|
|
int gfxInit(GraphicsContext *gfx);
|
|
void gfxDestroy(GraphicsContext *gfx);
|
|
|
|
void gfxUpdateEyes(GraphicsContext *gfx, const uint8_t *left, const uint8_t *right);
|
|
|
|
void gfxMenuInputBegin(GraphicsContext *gfx);
|
|
void gfxMenuHandleEvent(GraphicsContext *gfx, SDL_Event *event);
|
|
void gfxMenuInputEnd(GraphicsContext *gfx);
|
|
|
|
void gfxRender(GraphicsContext *gfx);
|
|
|
|
#endif
|