You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
972 B
23 lines
972 B
#include "uniquake.h"
|
|
|
|
#include "../Quake/quakedef.h"
|
|
#include "../Quake/gl_model.h"
|
|
|
|
viddef_t vid; // global video state
|
|
modestate_t modestate = MS_UNINIT;
|
|
|
|
typedef struct unity_glcalls_s
|
|
{
|
|
void *target;
|
|
|
|
int(*UploadAliasModel)(void *target, const char *name, vec3_t mins, vec3_t maxs, aliashdr_t *aliashdr, maliasframedesc_t *frames, trivertx_t **poseVerts, mtriangle_t *triangles, stvert_t *stVerts);
|
|
} unity_glcalls_t;
|
|
|
|
const unity_glcalls_t *unity_glcalls;
|
|
|
|
int UQ_GL_UploadAliasModel(qmodel_t *model, aliashdr_t *aliashdr, trivertx_t **poseVerts, mtriangle_t *triangles, stvert_t *stVerts)
|
|
{
|
|
// C# doesn't really understand this idea of a variable-length embedded array of structs,
|
|
// so we pass along the pointer to the first frame struct which allows us to manually marshal the entire array.
|
|
return unity_glcalls->UploadAliasModel(unity_glcalls->target, model->name, model->mins, model->maxs, aliashdr, &aliashdr->frames[0], poseVerts, triangles, stVerts);
|
|
}
|