This commit is contained in:
Nishi 2026-01-20 14:07:56 +09:00
commit f86e26cddd
11 changed files with 69 additions and 46 deletions

View file

@ -11,6 +11,8 @@ extern "C" {
GSDECL GSClient GSClientCreate(GSEngine engine);
GSDECL void GSClientDestroy(GSClient client);
GSDECL void GSClientStep(GSClient client);
GSDECL GSGL GSClientGetGL(GSClient client);
GSDECL void GSClientToggleSkybox(GSClient client, GSBool toggle);
#ifdef __cplusplus
}

View file

@ -16,7 +16,7 @@ GSDECL void GSEngineParamInit(GSEngineParam* param);
GSDECL void GSEngineLoop(GSEngine engine);
GSDECL GSClient GSEngineGetClient(GSEngine engine);
GSDECL GSServer GSEngineGetServer(GSEngine engine);
GSDECL int GSEngineRegisterResource(GSEngine engine, const char* name, const char* path);
GSDECL GSBool GSEngineRegisterResource(GSEngine engine, const char* name, const char* path);
GSDECL void GSEngineUnregisterResource(GSEngine engine, const char* name);
#ifdef __cplusplus

View file

@ -13,7 +13,7 @@ extern "C" {
#define GSGLMaxDistance 100.0
/* gl_shader.c */
GSDECL int GSGLShaderPrepare(GSGL gl, GLuint* shader, const char* vs, const char* fs);
GSDECL GSBool GSGLShaderPrepare(GSGL gl, GLuint* shader, const char* vs, const char* fs);
/* gl_texture.c */
GSDECL void GSGLTexturePrepare(GSGL gl, GLuint* texture, unsigned char* rgba, int width, int height);
@ -21,12 +21,12 @@ GSDECL void GSGLTextureSet(GSGL gl, GLuint texture);
GSDECL void GSGLTextureDelete(GSGL gl, GLuint texture);
/* gl_common.c */
GSDECL int GSGLTextureLoadFile(GSGL gl, GLuint* texture, int* width, int* height, const char* filename);
GSDECL int GSGLTextureTry(GSGL gl, GLuint* texture, int* width, int* height, const char* prefix);
GSDECL GSBool GSGLTextureLoadFile(GSGL gl, GLuint* texture, int* width, int* height, const char* filename);
GSDECL GSBool GSGLTextureTry(GSGL gl, GLuint* texture, int* width, int* height, const char* prefix);
/* gl_shadow.c */
GSDECL void GSGLShadowInit(GSGL gl);
GSDECL int GSGLShadowBeforeMapping(GSGL gl);
GSDECL GSBool GSGLShadowBeforeMapping(GSGL gl);
GSDECL void GSGLShadowAfterMapping(GSGL gl);
GSDECL void GSGLShadowEnd(GSGL gl);
GSDECL void GSGLShadowDeinit(GSGL gl);

View file

@ -78,6 +78,8 @@ typedef void (*GSReadyCallback)(int width, int height);
typedef void (*GSTickCallback)(void);
typedef long (*GSGetTickCallback)(void);
typedef void (*GSSleepCallback)(int ms);
typedef void (*GSRenderCallback)(GSEngine engine);
typedef void (*GSAfterRenderCallback)(GSEngine engine);
struct _GSResourceKV {
char* key;
@ -107,6 +109,7 @@ struct _GSClient {
GSVector3 camera;
GSVector4 light0;
GSSkyBox skybox;
GSBool skybox_enabled;
};
struct _GSSkyBox {
@ -190,6 +193,8 @@ struct _GSEngineParam {
GSTickCallback tick;
GSGetTickCallback get_tick;
GSSleepCallback sleep;
GSRenderCallback render;
GSAfterRenderCallback after_render;
};
#endif