static matrix4x4_t backend_projectmatrix;
static unsigned int backendunits, backendimageunits, backendarrayunits, backendactive;
-static mempool_t *gl_backend_mempool;
/*
note: here's strip order for a terrain row:
static void R_Mesh_CacheArray_Shutdown(void);
void GL_Backend_AllocArrays(void)
{
- if (!gl_backend_mempool)
- gl_backend_mempool = Mem_AllocPool("GL_Backend", 0, NULL);
R_Mesh_CacheArray_Startup();
}
void GL_Backend_FreeArrays(void)
{
R_Mesh_CacheArray_Shutdown();
- Mem_FreePool(&gl_backend_mempool);
}
static void gl_backend_start(void)
const int *p;
if (!qglIsEnabled(GL_VERTEX_ARRAY))
Con_Print("R_Mesh_Draw: vertex array not enabled\n");
- for (j = 0, size = numvertices * 3, p = gl_state.pointer_vertex + firstvertex * 3;j < size;j++, p++)
+ for (j = 0, size = numvertices * 3, p = (int *)((float *)gl_state.pointer_vertex + firstvertex * 3);j < size;j++, p++)
paranoidblah += *p;
if (gl_state.pointer_color)
{
if (!qglIsEnabled(GL_COLOR_ARRAY))
Con_Print("R_Mesh_Draw: color array set but not enabled\n");
- for (j = 0, size = numvertices * 4, p = gl_state.pointer_color + firstvertex * 4;j < size;j++, p++)
+ for (j = 0, size = numvertices * 4, p = (int *)((float *)gl_state.pointer_color + firstvertex * 4);j < size;j++, p++)
paranoidblah += *p;
}
for (i = 0;i < backendarrayunits;i++)
GL_ClientActiveTexture(i);
if (!qglIsEnabled(GL_TEXTURE_COORD_ARRAY))
Con_Print("R_Mesh_Draw: texcoord array set but not enabled\n");
- for (j = 0, size = numvertices * gl_state.units[i].arraycomponents, p = gl_state.units[i].pointer_texcoord + firstvertex * gl_state.units[i].arraycomponents;j < size;j++, p++)
+ for (j = 0, size = numvertices * gl_state.units[i].arraycomponents, p = (int *)((float *)gl_state.units[i].pointer_texcoord + firstvertex * gl_state.units[i].arraycomponents);j < size;j++, p++)
paranoidblah += *p;
}
}
if (r_render.integer)
{
// clear to black
- qglClearColor(0,0,0,0);CHECKGLERROR
+ if (fogenabled)
+ qglClearColor(fogcolor[0],fogcolor[1],fogcolor[2],0);
+ else
+ qglClearColor(0,0,0,0);
+ CHECKGLERROR
qglClearDepth(1);CHECKGLERROR
if (gl_stencil)
{
GL_DepthMask(GL_FALSE);
memset(&m, 0, sizeof(m));
R_Mesh_State(&m);
+ //qglEnable(GL_LINE_SMOOTH);
GL_ShowTrisColor(0.2,0.2,0.2,1);
r_showtrispass = 1;
}
R_TimeReport("meshfinish");
}
r_showtrispass = 0;
+ //qglDisable(GL_LINE_SMOOTH);
}
void SCR_UpdateLoadingScreen (void)
R_Mesh_Start();
R_Mesh_Matrix(&r_identitymatrix);
// draw the loading plaque
- pic = Draw_CachePic("gfx/loading.lmp");
+ pic = Draw_CachePic("gfx/loading", false);
x = (vid_conwidth.integer - pic->width)/2;
y = (vid_conheight.integer - pic->height)/2;
GL_Color(1,1,1,1);