From 19df154ac9c03eaf969e10f19db13bc1efa9fafe Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Tue, 22 Jan 2002 07:01:30 +0000 Subject: [PATCH] moved CHECKGLERROR to detect errors *after* rather than before uploading a texture git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1386 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 f62a0cb0..ef719e4c 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -1006,12 +1006,12 @@ static void R_Upload(gltexture_t *glt, byte *data) { glt->image->flags &= ~GLTEXF_UPLOAD; memset(resizebuffer, 255, glt->image->width * glt->image->height * glt->image->bytesperpixel); + glTexImage2D (GL_TEXTURE_2D, 0, glt->image->glinternalformat, glt->image->width, glt->image->height, 0, glt->image->glformat, GL_UNSIGNED_BYTE, resizebuffer); + CHECKGLERROR glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_mag); CHECKGLERROR glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_mag); CHECKGLERROR - glTexImage2D (GL_TEXTURE_2D, 0, glt->image->glinternalformat, glt->image->width, glt->image->height, 0, glt->image->glformat, GL_UNSIGNED_BYTE, resizebuffer); - CHECKGLERROR } if (prevbuffer == NULL) -- 2.39.2