2024-10-16 04:25:31 +00:00
|
|
|
#ifndef SHROOMS_VB_NATIVE_GRAPHICS_
|
|
|
|
#define SHROOMS_VB_NATIVE_GRAPHICS_
|
|
|
|
|
2024-10-22 03:31:55 +00:00
|
|
|
#include <SDL3/SDL.h>
|
2024-10-16 04:25:31 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
SDL_Window *window;
|
|
|
|
SDL_Surface *winSurface;
|
|
|
|
SDL_Renderer *renderer;
|
|
|
|
SDL_Texture *leftEye;
|
|
|
|
SDL_Texture *rightEye;
|
|
|
|
} 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);
|
|
|
|
|
|
|
|
void gfxRender(GraphicsContext *gfx);
|
|
|
|
|
|
|
|
#endif
|