From: divverent Date: Mon, 1 Feb 2010 07:29:57 +0000 (+0000) Subject: fix sky drawing really this tiem X-Git-Tag: xonotic-v0.1.0preview~230^2~554 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=e25ec73b388ad038b3999b26d70c03c4a1b9c482 fix sky drawing really this tiem git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9915 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 7d5d2594..04b58483 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -8196,11 +8196,8 @@ void R_RenderScene(void) if (skyrendermasked && skyrenderlater) { // we have to force off the water clipping plane while rendering sky - qboolean save = r_refdef.view.showdebug; R_SetupView(false); - r_refdef.view.showdebug = false; R_Sky(); - r_refdef.view.showdebug = save; R_SetupView(true); if (r_timereport_active) R_TimeReport("sky"); @@ -10980,7 +10977,7 @@ static void R_DrawWorldTextureSurfaceList(int texturenumsurfaces, const msurface { CHECKGLERROR RSurf_SetupDepthAndCulling(); - if (r_showsurfaces.integer == 3 && !prepass) + if (r_showsurfaces.integer == 3 && !prepass && (rsurface.texture->currentmaterialflags & MATERIALFLAG_SKY)) { R_DrawTextureSurfaceList_ShowSurfaces3(texturenumsurfaces, texturesurfacelist, writedepth); return; @@ -11005,7 +11002,7 @@ static void R_DrawModelTextureSurfaceList(int texturenumsurfaces, const msurface { CHECKGLERROR RSurf_SetupDepthAndCulling(); - if (r_showsurfaces.integer == 3 && !prepass) + if (r_showsurfaces.integer == 3 && !prepass && (rsurface.texture->currentmaterialflags & MATERIALFLAG_SKY)) { R_DrawTextureSurfaceList_ShowSurfaces3(texturenumsurfaces, texturesurfacelist, writedepth); return; diff --git a/r_sky.c b/r_sky.c index d5db3e61..dad23fff 100644 --- a/r_sky.c +++ b/r_sky.c @@ -302,7 +302,7 @@ static void R_SkyBox(void) int i; RSurf_ActiveCustomEntity(&skymatrix, &skyinversematrix, 0, 0, 1, 1, 1, 1, 6*4, skyboxvertex3f, skyboxtexcoord2f, NULL, NULL, NULL, NULL, 6*2, skyboxelement3i, skyboxelement3s, false, false); for (i = 0;i < 6;i++) - R_DrawCustomSurface(skyboxskinframe[i], &identitymatrix, MATERIALFLAG_FULLBRIGHT | MATERIALFLAG_NOCULLFACE | MATERIALFLAG_NODEPTHTEST, i*4, 4, i*2, 2, false, false); + R_DrawCustomSurface(skyboxskinframe[i], &identitymatrix, MATERIALFLAG_SKY | MATERIALFLAG_FULLBRIGHT | MATERIALFLAG_NOCULLFACE | MATERIALFLAG_NODEPTHTEST, i*4, 4, i*2, 2, false, false); } #define skygridx 32 @@ -390,8 +390,8 @@ static void R_SkySphere(void) Matrix4x4_CreateTranslate(&scroll2matrix, speedscale, speedscale, 0); RSurf_ActiveCustomEntity(&skymatrix, &skyinversematrix, 0, 0, 1, 1, 1, 1, skysphere_numverts, skysphere_vertex3f, skysphere_texcoord2f, NULL, NULL, NULL, NULL, skysphere_numtriangles, skysphere_element3i, skysphere_element3s, false, false); - R_DrawCustomSurface(r_refdef.scene.worldmodel->brush.solidskyskinframe, &scroll1matrix, MATERIALFLAG_FULLBRIGHT | MATERIALFLAG_NOCULLFACE | MATERIALFLAG_NODEPTHTEST , 0, skysphere_numverts, 0, skysphere_numtriangles, false, false); - R_DrawCustomSurface(r_refdef.scene.worldmodel->brush.alphaskyskinframe, &scroll2matrix, MATERIALFLAG_FULLBRIGHT | MATERIALFLAG_NOCULLFACE | MATERIALFLAG_NODEPTHTEST | MATERIALFLAG_ALPHA | MATERIALFLAG_BLENDED, 0, skysphere_numverts, 0, skysphere_numtriangles, false, false); + R_DrawCustomSurface(r_refdef.scene.worldmodel->brush.solidskyskinframe, &scroll1matrix, MATERIALFLAG_SKY | MATERIALFLAG_FULLBRIGHT | MATERIALFLAG_NOCULLFACE | MATERIALFLAG_NODEPTHTEST , 0, skysphere_numverts, 0, skysphere_numtriangles, false, false); + R_DrawCustomSurface(r_refdef.scene.worldmodel->brush.alphaskyskinframe, &scroll2matrix, MATERIALFLAG_SKY | MATERIALFLAG_FULLBRIGHT | MATERIALFLAG_NOCULLFACE | MATERIALFLAG_NODEPTHTEST | MATERIALFLAG_ALPHA | MATERIALFLAG_BLENDED, 0, skysphere_numverts, 0, skysphere_numtriangles, false, false); } void R_Sky(void)