skybox
This commit is contained in:
parent
17ba5bfe64
commit
57685ed075
20 changed files with 282 additions and 13 deletions
|
|
@ -14,5 +14,6 @@
|
|||
#include <GearBox/File.h>
|
||||
#include <GearBox/Resource.h>
|
||||
#include <GearBox/Endian.h>
|
||||
#include <GearBox/SkyBox.h>
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -10,11 +10,16 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GBGLMaxDistance 100.0
|
||||
|
||||
/* gl_shader.c */
|
||||
GBDECL int GBGLShaderPrepare(GBGL gl, GLuint* shader, const char* vs, const char* fs);
|
||||
|
||||
/* gl_texture.c */
|
||||
GBDECL int GBGLTexturePrepare(GBGL gl, GLuint* texture, unsigned char* rgba, int width, int height);
|
||||
GBDECL void GBGLTexturePrepare(GBGL gl, GLuint* texture, unsigned char* rgba, int width, int height);
|
||||
GBDECL void GBGLTextureSet(GBGL gl, GLuint texture);
|
||||
GBDECL int GBGLTextureLoadFile(GBGL gl, GLuint* texture, int* width, int* height, const char* filename);
|
||||
GBDECL void GBGLTextureDelete(GBGL gl, GLuint texture);
|
||||
|
||||
/* gl_shadow.c */
|
||||
GBDECL void GBGLShadowInit(GBGL gl);
|
||||
|
|
@ -32,6 +37,7 @@ GBDECL void GBGLClear(GBGL gl);
|
|||
GBDECL void GBGLIgnoreDepth(GBGL gl);
|
||||
GBDECL void GBGLCareDepth(GBGL gl);
|
||||
GBDECL void GBGLSetLight(GBGL gl);
|
||||
GBDECL void GBGLPolygon(GBGL gl, int pairs, GBVector3* vert, GBVector2* tex);
|
||||
|
||||
/* gl_camera.c */
|
||||
GBDECL void GBGLCameraPerspective(GBGL gl, GBNumber width, GBNumber height);
|
||||
|
|
|
|||
19
engine/include/GearBox/SkyBox.h
Normal file
19
engine/include/GearBox/SkyBox.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef __GEARBOX_SKYBOX_H__
|
||||
#define __GEARBOX_SKYBOX_H__
|
||||
|
||||
#include <GearBox/MachDep.h>
|
||||
#include <GearBox/TypeDefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
GBDECL GBSkyBox GBSkyBoxOpen(GBClient client, const char* base);
|
||||
GBDECL void GBSkyBoxDraw(GBSkyBox skybox);
|
||||
GBDECL void GBSkyBoxClose(GBSkyBox skybox);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -9,6 +9,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
GBDECL char* GBStringDuplicate(const char* str);
|
||||
GBDECL char* GBStringConcat(const char* str1, const char* str2);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ typedef struct _GBEngine* GBEngine;
|
|||
typedef struct _GBFile* GBFile;
|
||||
typedef struct _GBResource* GBResource;
|
||||
typedef struct _GBGL* GBGL;
|
||||
typedef struct _GBSkyBox* GBSkyBox;
|
||||
#else
|
||||
typedef void* GBClient;
|
||||
typedef void* GBServer;
|
||||
|
|
@ -54,8 +55,10 @@ typedef void* GBEngine;
|
|||
typedef void* GBFile;
|
||||
typedef void* GBResource;
|
||||
typedef void* GBGL;
|
||||
typedef void* GBSkyBox;
|
||||
#endif
|
||||
typedef float GBNumber;
|
||||
typedef GBNumber GBVector2[2];
|
||||
typedef GBNumber GBVector3[3];
|
||||
typedef GBNumber GBVector4[4];
|
||||
typedef GBNumber GBMatrix4x4[16];
|
||||
|
|
@ -93,6 +96,18 @@ struct _GBClient {
|
|||
GBVector3 look_at;
|
||||
GBVector3 camera;
|
||||
GBVector4 light0;
|
||||
GBSkyBox skybox;
|
||||
};
|
||||
|
||||
struct _GBSkyBox {
|
||||
GBEngine engine;
|
||||
|
||||
GLuint left;
|
||||
GLuint right;
|
||||
GLuint front;
|
||||
GLuint back;
|
||||
GLuint up;
|
||||
GLuint down;
|
||||
};
|
||||
|
||||
struct _GBServer {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue