From 38ee0d28a510576b724da97cfeb46de9c2a7c286 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 23 Oct 2008 10:44:31 +0000 Subject: [PATCH] changed default texnum value from -1 to 0 in rtexture_t, this is only a safety measure against any possible feeding of -1 to drivers that crash when given an invalid texnum git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8536 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_textures.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gl_textures.c b/gl_textures.c index 2ad1a2e0..0178133b 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -226,7 +226,7 @@ void R_MarkDirtyTexture(rtexture_t *rt) { if( !glt->dirtytexnum && glt->flags & GLTEXF_DYNAMIC ) { glt->dirtytexnum = glt->texnum; // mark it as dirty, so R_RealGetTexture gets called - glt->texnum = -1; + glt->texnum = 0; } } @@ -1047,7 +1047,7 @@ static rtexture_t *R_SetupTexture(rtexturepool_t *rtexturepool, const char *iden glt->glformat = texinfo->glformat; glt->bytesperpixel = texinfo->internalbytesperpixel; glt->sides = glt->texturetype == GLTEXTURETYPE_CUBEMAP ? 6 : 1; - glt->texnum = -1; + glt->texnum = 0; // init the dynamic texture attributes, too [11/22/2007 Black] glt->dirtytexnum = 0; glt->updatecallback = NULL; -- 2.39.2