git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4991 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5172823341
commit
3e0e4c43a8
4 changed files with 18 additions and 11 deletions
|
@ -105,8 +105,10 @@ void CL_FreeDlights(void)
|
|||
if (cl_dlights[i].worldshadowmesh)
|
||||
SH_FreeShadowMesh(cl_dlights[i].worldshadowmesh);
|
||||
|
||||
#ifdef GLQUAKE
|
||||
if (cl_dlights[i].coronaocclusionquery)
|
||||
qglDeleteQueriesARB(1, &cl_dlights[i].coronaocclusionquery);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2667,8 +2667,8 @@ static void BE_UploadLightmaps(qboolean force)
|
|||
{
|
||||
lightmap[i]->rectchange.l = 0;
|
||||
lightmap[i]->rectchange.t = 0;
|
||||
lightmap[i]->rectchange.w = lightmap[i]->width;
|
||||
lightmap[i]->rectchange.h = lightmap[i]->height;
|
||||
lightmap[i]->rectchange.r = lightmap[i]->width;
|
||||
lightmap[i]->rectchange.b = lightmap[i]->height;
|
||||
lightmap[i]->modified = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -2752,8 +2752,8 @@ static void BE_UploadLightmaps(qboolean force)
|
|||
{
|
||||
lm->rectchange.l = 0;
|
||||
lm->rectchange.t = 0;
|
||||
lm->rectchange.w = lm->width;
|
||||
lm->rectchange.h = lm->height;
|
||||
lm->rectchange.r = lm->width;
|
||||
lm->rectchange.b = lm->height;
|
||||
}
|
||||
|
||||
if (lightmap[i]->modified)
|
||||
|
@ -2764,6 +2764,7 @@ static void BE_UploadLightmaps(qboolean force)
|
|||
RECT rect;
|
||||
glRect_t *theRect = &lm->rectchange;
|
||||
int r;
|
||||
int w;
|
||||
|
||||
if (!TEXLOADED(lm->lightmap_texture))
|
||||
lm->lightmap_texture = Image_CreateTexture("***lightmap***", NULL, (gl_lightmap_nearest.ival?IF_NEAREST:IF_LINEAR)|IF_NOMIPMAP);
|
||||
|
@ -2779,20 +2780,20 @@ static void BE_UploadLightmaps(qboolean force)
|
|||
|
||||
lm->modified = 0;
|
||||
rect.left = theRect->l;
|
||||
rect.right = theRect->l + theRect->w;
|
||||
rect.right = theRect->r;
|
||||
rect.top = theRect->t;
|
||||
rect.bottom = theRect->t + theRect->h;
|
||||
rect.bottom = theRect->b;
|
||||
|
||||
IDirect3DTexture9_LockRect(tex, 0, &lock, &rect, 0);
|
||||
for (r = 0; r < lightmap[i]->rectchange.h; r++)
|
||||
for (r = 0, w = theRect->r-theRect->l; r < lightmap[i]->rectchange.b-lightmap[i]->rectchange.t; r++)
|
||||
{
|
||||
memcpy((char*)lock.pBits + r*lock.Pitch, lightmap[i]->lightmaps+(theRect->l+((r+theRect->t)*lm->width))*lightmap_bytes, lightmap[i]->rectchange.w*lightmap_bytes);
|
||||
memcpy((char*)lock.pBits + r*lock.Pitch, lightmap[i]->lightmaps+(theRect->l+((r+theRect->t)*lm->width))*lightmap_bytes, w*lightmap_bytes);
|
||||
}
|
||||
IDirect3DTexture9_UnlockRect(tex, 0);
|
||||
theRect->l = lm->width;
|
||||
theRect->t = lm->height;
|
||||
theRect->h = 0;
|
||||
theRect->w = 0;
|
||||
theRect->r = 0;
|
||||
theRect->b = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -418,7 +418,11 @@ void R_RenderDlights (void)
|
|||
method = r_coronas_occlusion.ival;
|
||||
if (method == 3 && qrenderer != QR_OPENGL)
|
||||
method = 1;
|
||||
if (method == 4 && (qrenderer != QR_OPENGL || !qglGenQueriesARB))
|
||||
if (method == 4
|
||||
#ifdef GLQUAKE
|
||||
&& (qrenderer != QR_OPENGL || !qglGenQueriesARB)
|
||||
#endif
|
||||
)
|
||||
method = 1;
|
||||
|
||||
switch(method)
|
||||
|
|
Loading…
Reference in a new issue