lemur/graphics.h

29 lines
724 B
C
Raw Normal View History

#ifndef SHROOMS_VB_NATIVE_GRAPHICS_
#define SHROOMS_VB_NATIVE_GRAPHICS_
#include <SDL2/SDL.h>
2024-10-26 05:20:25 +00:00
#include <nuklear.h>
typedef struct {
SDL_Window *window;
SDL_Renderer *renderer;
SDL_Texture *leftEye;
SDL_Texture *rightEye;
2024-10-26 05:20:25 +00:00
struct nk_context *nk;
struct nk_colorf bg;
} GraphicsContext;
int gfxInit(GraphicsContext *gfx);
void gfxDestroy(GraphicsContext *gfx);
void gfxUpdateLeftEye(GraphicsContext *gfx, const uint8_t *bytes);
void gfxUpdateRightEye(GraphicsContext *gfx, const uint8_t *bytes);
2024-10-26 05:20:25 +00:00
void gfxMenuInputBegin(GraphicsContext *gfx);
void gfxMenuHandleEvent(GraphicsContext *gfx, SDL_Event *event);
void gfxMenuInputEnd(GraphicsContext *gfx);
void gfxRender(GraphicsContext *gfx);
#endif