assaultfish/engine/include/GearSrc/GL.h

77 lines
3.1 KiB
C
Raw Normal View History

2026-01-12 01:55:20 +09:00
#ifndef __GEARSRC_GL_H__
#define __GEARSRC_GL_H__
2026-01-12 01:54:35 +09:00
#include <GearSrc/MachDep.h>
#include <GearSrc/TypeDefs.h>
#include <GearSrc/GL/GL.h>
#ifdef __cplusplus
extern "C" {
#endif
#define GSGLMaxDistance 100.0
/* gl_shader.c */
2026-01-20 14:07:56 +09:00
GSDECL GSBool GSGLShaderPrepare(GSGL gl, GLuint* shader, const char* vs, const char* fs);
2026-01-12 01:54:35 +09:00
/* gl_texture.c */
2026-01-25 05:18:56 +09:00
GSDECL void GSGLTextureLoad(GSGL gl, GLuint* texture, unsigned char* rgba, int width, int height); /* you probably don't want this. use GSGLTexturePrepare */
2026-01-12 01:54:35 +09:00
GSDECL void GSGLTextureSet(GSGL gl, GLuint texture);
GSDECL void GSGLTextureDelete(GSGL gl, GLuint texture);
2026-01-18 23:42:29 +09:00
/* gl_common.c */
2026-01-25 05:18:56 +09:00
GSDECL void GSGLTexturePrepareEx(GSGL gl, GLuint* texture, unsigned char* rgba, int width, int height, int expand);
GSDECL void GSGLTexturePrepare(GSGL gl, GLuint* texture, unsigned char* rgba, int width, int height);
2026-01-20 14:07:56 +09:00
GSDECL GSBool GSGLTextureLoadFile(GSGL gl, GLuint* texture, int* width, int* height, const char* filename);
2026-01-25 05:18:56 +09:00
GSDECL GSBool GSGLTextureLoadFileEx(GSGL gl, GLuint* texture, int* width, int* height, const char* filename, int expand);
2026-01-20 14:07:56 +09:00
GSDECL GSBool GSGLTextureTry(GSGL gl, GLuint* texture, int* width, int* height, const char* prefix);
2026-01-25 05:18:56 +09:00
GSDECL GSBool GSGLTextureTryEx(GSGL gl, GLuint* texture, int* width, int* height, const char* prefix, int expand);
2026-01-25 06:31:19 +09:00
GSDECL void GSGLTextBold(GSGL gl, GSBool bold);
2026-01-25 05:18:56 +09:00
GSDECL void GSGLTextEx(GSGL gl, GSNumber x, GSNumber y, const char* text, GSNumber sx, GSNumber sy);
GSDECL void GSGLText(GSGL gl, GSNumber x, GSNumber y, const char* text);
2026-01-20 14:34:13 +09:00
GSDECL double GSGLTextWidth(GSGL gl, const char* text);
GSDECL double GSGLTextHeight(GSGL gl, const char* text);
2026-01-18 23:42:29 +09:00
2026-01-12 01:54:35 +09:00
/* gl_shadow.c */
2026-01-23 15:38:08 +09:00
GSDECL void GSGLShadowInit(GSGL gl);
2026-01-20 14:07:56 +09:00
GSDECL GSBool GSGLShadowBeforeMapping(GSGL gl);
2026-01-23 15:38:08 +09:00
GSDECL void GSGLShadowAfterMapping(GSGL gl);
GSDECL void GSGLShadowEnd(GSGL gl);
GSDECL void GSGLShadowDeinit(GSGL gl);
GSDECL void GSGLShadowDisable(GSGL gl);
GSDECL void GSGLShadowEnable(GSGL gl);
2026-01-12 01:54:35 +09:00
/* gl.c */
2026-01-13 04:28:36 +09:00
GSDECL GSGL GSGLCreate(GSClient client);
GSDECL void GSGLDestroy(GSGL gl);
GSDECL void GSGLClear(GSGL gl);
GSDECL void GSGLIgnoreDepth(GSGL gl);
GSDECL void GSGLCareDepth(GSGL gl);
GSDECL void GSGLSetLight(GSGL gl);
GSDECL void GSGLPolygon(GSGL gl, int pairs, GSVector3* vert, GSVector2* tex, GSVector3 norm);
GSDECL void GSGLPolygon2D(GSGL gl, int pairs, GSVector2* vert, GSVector2* tex);
GSDECL void GSGLBegin2D(GSGL gl);
GSDECL void GSGLEnd2D(GSGL gl);
2026-01-19 13:53:52 +09:00
GSDECL void GSGLSetPosition(GSGL gl, GSVector3 pos);
GSDECL void GSGLSetRotation(GSGL gl, GSVector3 rot);
2026-01-13 04:28:36 +09:00
GSDECL void GSGLPushMatrix(GSGL gl);
GSDECL void GSGLPopMatrix(GSGL gl);
GSDECL GLuint GSGLBeginList(GSGL gl);
GSDECL void GSGLEndList(GSGL gl);
GSDECL void GSGLCallList(GSGL gl, GLuint list);
2026-01-23 15:38:08 +09:00
GSDECL void GSGLSetColor(GSGL gl, GSVector4 color);
2026-01-25 01:56:36 +09:00
GSDECL void GSGLClearDepth(GSGL gl);
2026-01-25 13:05:30 +09:00
GSDECL void GSGLInitialTranslation(GSGL gl);
2026-01-12 01:54:35 +09:00
/* gl_camera.c */
GSDECL void GSGLCameraPerspective(GSGL gl, GSNumber width, GSNumber height);
GSDECL void GSGLCameraSet(GSGL gl);
GSDECL void GSGLCameraLookAt(GSGL gl, GSVector3 camera, GSVector3 look_at);
GSDECL void GSGLCameraSetup(GSGL gl);
#ifdef __cplusplus
}
#endif
#endif