mtl support
This commit is contained in:
parent
1f0437ab0c
commit
76bbf980eb
9 changed files with 194 additions and 54 deletions
|
|
@ -18,9 +18,12 @@ GSDECL int GSGLShaderPrepare(GSGL gl, GLuint* shader, const char* vs, const char
|
|||
/* gl_texture.c */
|
||||
GSDECL void GSGLTexturePrepare(GSGL gl, GLuint* texture, unsigned char* rgba, int width, int height);
|
||||
GSDECL void GSGLTextureSet(GSGL gl, GLuint texture);
|
||||
GSDECL int GSGLTextureLoadFile(GSGL gl, GLuint* texture, int* width, int* height, const char* filename);
|
||||
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);
|
||||
|
||||
/* gl_shadow.c */
|
||||
GSDECL void GSGLShadowInit(GSGL gl);
|
||||
GSDECL int GSGLShadowBeforeMapping(GSGL gl);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@ typedef struct _GSGL* GSGL;
|
|||
typedef struct _GSSkyBox* GSSkyBox;
|
||||
typedef struct _GSModel* GSModel;
|
||||
|
||||
typedef struct _GSModelFace GSModelFace;
|
||||
typedef struct _GSModelFace GSModelFace;
|
||||
typedef struct _GSModelMaterial GSModelMaterial;
|
||||
typedef struct _GSModelUseMaterial GSModelUseMaterial;
|
||||
#else
|
||||
typedef void* GSClient;
|
||||
typedef void* GSServer;
|
||||
|
|
@ -121,12 +123,24 @@ struct _GSModelFace {
|
|||
GSVector2* texcoord;
|
||||
};
|
||||
|
||||
struct _GSModelMaterial {
|
||||
char* key;
|
||||
GLuint value;
|
||||
};
|
||||
|
||||
struct _GSModelUseMaterial {
|
||||
int key;
|
||||
char* value;
|
||||
};
|
||||
|
||||
struct _GSModel {
|
||||
GSEngine engine;
|
||||
|
||||
GLuint texture;
|
||||
GLuint call_list;
|
||||
|
||||
GSModelMaterial* material;
|
||||
GSModelUseMaterial* usemtl;
|
||||
|
||||
float* vertex;
|
||||
float* texcoord;
|
||||
GSModelFace* face;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue