tenebrae2/bumpdriver.h

60 lines
1.7 KiB
C
Raw Normal View History

2004-02-08 09:52:47 +00:00
DriverPtr GL_WrapUserPointer(void *p);
DriverPtr GL_OffsetDriverPtr(DriverPtr p, int offset);
2003-02-15 19:59:11 +00:00
/**
* Gives a definition of the vertices passed to the shedule* functions.
* Use NULL if the data is not available/applicable to the suff you send.
*/
typedef struct {
2004-02-08 09:52:47 +00:00
DriverPtr vertices;
2003-02-15 19:59:11 +00:00
int vertexstride;
2004-02-08 09:52:47 +00:00
DriverPtr texcoords;
2003-02-15 19:59:11 +00:00
int texcoordstride;
2004-02-08 09:52:47 +00:00
DriverPtr lightmapcoords;
2003-02-15 19:59:11 +00:00
int lightmapstride;
2004-02-08 09:52:47 +00:00
DriverPtr tangents;
2003-02-15 19:59:11 +00:00
int tangentstride;
2004-02-08 09:52:47 +00:00
DriverPtr binormals;
2003-02-15 19:59:11 +00:00
int binormalstride;
2004-02-08 09:52:47 +00:00
DriverPtr normals;
2003-02-15 19:59:11 +00:00
int normalstride;
2004-02-08 09:52:47 +00:00
DriverPtr colors;
2003-02-15 19:59:11 +00:00
int colorstride;
} vertexdef_t;
typedef struct {
vec3_t objectorigin;
vec3_t objectvieworg;
} lightobject_t;
2003-02-15 19:59:11 +00:00
/**
* This is a generic bumpdriver struct, it contains al the driver routines
*/
typedef struct {
//system code
//initialize the driver, we don't call this twice currently but we may need this if
//we want to do dynamic resolution changes => reinit of the whole opengl stuff.
void (*initDriver) (void);
void (*freeDriver) (void);
//drawing code
2003-03-15 19:50:16 +00:00
void (*drawTriangleListBase) (vertexdef_t *verts, int *indecies, int numIndecies, shader_t *shader, int lightmapIndex);//-1 for no lightmap
void (*drawTriangleListBump) (const vertexdef_t *verts, int *indecies, int numIndecies, shader_t *shader, const transform_t *tr, const lightobject_t *lo);
2003-02-15 19:59:11 +00:00
void (*drawTriangleListSys) (vertexdef_t *verts, int *indecies, int numIndecies, shader_t *shader);
void (*drawSurfaceListBase) (vertexdef_t *verts, msurface_t **surfs, int numSurfaces, shader_t *shader);
void (*drawSurfaceListBump) (vertexdef_t *verts, msurface_t **surfs, int numSurfaces, const transform_t *tr, const lightobject_t *lo);
2003-02-15 19:59:11 +00:00
} bumpdriver_t;
extern bumpdriver_t gl_bumpdriver;