From 82211327e82b37b7de09b3434c08e717447e595f Mon Sep 17 00:00:00 2001 From: plagman Date: Wed, 20 May 2009 22:30:18 +0000 Subject: [PATCH] Work around ATI driver bug (that's there since Cat 8.10 according to the intertubes). git-svn-id: https://svn.eduke32.com/eduke32@1389 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymer.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index 1bd6de3d5..1fc9dfcf1 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -4462,14 +4462,23 @@ static void polymer_initrendertargets(int32_t count) prrts[i].xdim = 128 << pr_shadowdetail; prrts[i].ydim = 128 << pr_shadowdetail; prrts[i].color = 0; + + bglGenTextures(1, &prrts[i].color); + bglBindTexture(prrts[i].target, prrts[i].color); + + bglTexImage2D(prrts[i].target, 0, GL_RGBA, prrts[i].xdim, prrts[i].ydim, 0, GL_RGBA, GL_SHORT, NULL); + bglTexParameteri(prrts[i].target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + bglTexParameteri(prrts[i].target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + bglTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_S, GL_CLAMP); + bglTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_T, GL_CLAMP); } bglGenTextures(1, &prrts[i].z); bglBindTexture(prrts[i].target, prrts[i].z); bglTexImage2D(prrts[i].target, 0, GL_DEPTH_COMPONENT, prrts[i].xdim, prrts[i].ydim, 0, GL_DEPTH_COMPONENT, GL_SHORT, NULL); - bglTexParameteri(prrts[i].target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - bglTexParameteri(prrts[i].target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + bglTexParameteri(prrts[i].target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + bglTexParameteri(prrts[i].target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); bglTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_S, GL_CLAMP); bglTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_T, GL_CLAMP); bglTexParameteri(prrts[i].target, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);