-
-//cvar_t gl_transform = {0, "gl_transform", "1"};
-cvar_t gl_lockarrays = {0, "gl_lockarrays", "1"};
-
-typedef struct
-{
- float m[3][4];
-} zymbonematrix;
-
-// LordHavoc: vertex array
-float *aliasvert;
-float *aliasvertnorm;
-float *aliasvertcolor;
-float *aliasvertcolor2;
-zymbonematrix *zymbonepose;
-int *aliasvertusage;
-
-rmeshinfo_t aliasmeshinfo;
-
-rtexture_t *chrometexture;
-
-int arraylocked = false;
-void GL_LockArray(int first, int count)
-{
- if (gl_supportslockarrays && gl_lockarrays.integer)
- {
- qglLockArraysEXT(first, count);
- arraylocked = true;
- }
-}
-
-void GL_UnlockArray(void)
-{
- if (arraylocked)
- {
- qglUnlockArraysEXT();
- arraylocked = false;
- }
-}
-
-/*
-void GL_SetupModelTransform (vec3_t origin, vec3_t angles, vec_t scale)
-{
- glTranslatef (origin[0], origin[1], origin[2]);
-
- if (scale != 1)
- glScalef (scale, scale, scale);
- if (angles[1])
- glRotatef (angles[1], 0, 0, 1);
- if (angles[0])
- glRotatef (-angles[0], 0, 1, 0);
- if (angles[2])
- glRotatef (angles[2], 1, 0, 0);
-}
-*/
-
-rtexturepool_t *chrometexturepool;
-
-// currently unused reflection effect texture
-void makechrometexture(void)
-{
- int i;
- qbyte noise[64*64];
- qbyte data[64*64][4];
-
- fractalnoise(noise, 64, 8);
-
- // convert to RGBA data
- for (i = 0;i < 64*64;i++)
- {
- data[i][0] = data[i][1] = data[i][2] = noise[i];
- data[i][3] = 255;
- }
-
- chrometexture = R_LoadTexture (chrometexturepool, "chrometexture", 64, 64, &data[0][0], TEXTYPE_RGBA, TEXF_MIPMAP | TEXF_PRECACHE);
-}
-
-mempool_t *gl_models_mempool;
-
-void gl_models_start(void)
-{
- // allocate vertex processing arrays
- gl_models_mempool = Mem_AllocPool("GL_Models");
- aliasvert = Mem_Alloc(gl_models_mempool, sizeof(float[MD2MAX_VERTS][4]));
- aliasvertnorm = Mem_Alloc(gl_models_mempool, sizeof(float[MD2MAX_VERTS][3]));
- aliasvertcolor = Mem_Alloc(gl_models_mempool, sizeof(float[MD2MAX_VERTS][4]));
- aliasvertcolor2 = Mem_Alloc(gl_models_mempool, sizeof(float[MD2MAX_VERTS][4])); // used temporarily for tinted coloring
- zymbonepose = Mem_Alloc(gl_models_mempool, sizeof(zymbonematrix[256]));
- aliasvertusage = Mem_Alloc(gl_models_mempool, sizeof(int[MD2MAX_VERTS]));
- chrometexturepool = R_AllocTexturePool();
- makechrometexture();
-}
-
-void gl_models_shutdown(void)
-{
- R_FreeTexturePool(&chrometexturepool);
- Mem_FreePool(&gl_models_mempool);
-}
-
-void gl_models_newmap(void)
-{
-}