From bb67cd181e39e3a9049c300c8fa5f891a9a54d8d Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 1 Feb 2006 22:32:39 +0000 Subject: [PATCH] Fixes the skybox in d3d. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1922 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_warp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/engine/gl/gl_warp.c b/engine/gl/gl_warp.c index efea1ce38..5576780d7 100644 --- a/engine/gl/gl_warp.c +++ b/engine/gl/gl_warp.c @@ -744,12 +744,14 @@ void R_DrawSkySphere (msurface_t *fa) if (!cls.allow_skyboxes) //allow a little extra fps. {//Draw the texture chain to only the depth buffer. - qglColorMask(0,0,0,0); + if (qglColorMask) + qglColorMask(0,0,0,0); for (; fa; fa = fa->texturechain) { GL_DrawAliasMesh(fa->mesh, 0); } - qglColorMask(1,1,1,1); + if (qglColorMask) + qglColorMask(1,1,1,1); } } @@ -908,11 +910,13 @@ void R_DrawSkyBox (msurface_t *s) if (!cls.allow_skyboxes && s) //allow a little extra fps. { //write the depth correctly - qglColorMask(0, 0, 0, 0); //depth only. + if (qglColorMask) + qglColorMask(0, 0, 0, 0); //depth only. for (fa = s; fa; fa = fa->texturechain) GL_DrawAliasMesh(fa->mesh, 1); - qglColorMask(1, 1, 1, 1); + if (qglColorMask) + qglColorMask(1, 1, 1, 1); } }