From f2a9e850a0e5663c336b1d47390114627a09ecfa Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 7 Sep 2015 14:42:17 +0000 Subject: [PATCH] fix ugly shading on non-glsl surfaces. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4985 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/quakedef.h | 3 ++- engine/gl/gl_backend.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/engine/client/quakedef.h b/engine/client/quakedef.h index 83e1ca475..dc77dc143 100644 --- a/engine/client/quakedef.h +++ b/engine/client/quakedef.h @@ -321,7 +321,6 @@ void Host_InitCommands (void); void Host_Init (quakeparms_t *parms); void Host_FinishInit(void); void Host_Shutdown(void); -extern qboolean com_workererror; //supresses shutdown prints+threads NORETURN void VARGS Host_Error (char *error, ...) LIKEPRINTF(1); NORETURN void VARGS Host_EndGame (char *message, ...) LIKEPRINTF(1); qboolean Host_SimulationTime(float time); @@ -332,6 +331,7 @@ void VARGS Host_ClientCommands (char *fmt, ...) LIKEPRINTF(1); void Host_ShutdownServer (qboolean crash); #ifdef LOADERTHREAD +extern qboolean com_workererror; //supresses shutdown prints+threads extern cvar_t worker_flush; qboolean COM_DoWork(int thread, qboolean leavelocked); #define COM_MainThreadWork() while (COM_DoWork(0, false) && worker_flush.ival) /*called each frame to do any gl uploads or whatever*/ @@ -349,6 +349,7 @@ void COM_AssertMainThread(const char *msg); #define COM_AssertMainThread(msg) #endif #else +#define com_workererror false #define COM_AddWork(t,f,a,b,c,d) (f)((a),(b),(c),(d)) #define COM_WorkerPartialSync(c,a,v) #define COM_WorkerFullSync() diff --git a/engine/gl/gl_backend.c b/engine/gl/gl_backend.c index 6c5da3b03..45e2f0bff 100644 --- a/engine/gl/gl_backend.c +++ b/engine/gl/gl_backend.c @@ -1075,8 +1075,8 @@ int GLBE_SetupForShadowMap(texid_t shadowmaptex, int texwidth, int texheight, fl shaderstate.shaderbits &= ~SBITS_MISC_DEPTHWRITE; - if (qglShadeModel) - qglShadeModel(GL_FLAT); +// if (qglShadeModel) +// qglShadeModel(GL_FLAT); GL_ForceDepthWritable(); // qglColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);