Browse Source

remove some unused code

Daniel Kolesa 7 months ago
parent
commit
deef18dd6b
2 changed files with 1 additions and 24 deletions
  1. 0
    22
      src/engine/rendergl.cc
  2. 1
    2
      src/engine/renderlights.cc

+ 0
- 22
src/engine/rendergl.cc View File

@@ -273,28 +273,6 @@ VAR(usetexcompress, 1, 0, 0);
273 273
 VAR(maxdrawbufs, 1, 0, 0);
274 274
 VAR(maxdualdrawbufs, 1, 0, 0);
275 275
 
276
-static bool checkseries(const char *s, const char *name, int low, int high)
277
-{
278
-    if(name) s = strstr(s, name);
279
-    if(!s) return false;
280
-    while(*s && !isdigit(*s)) ++s;
281
-    if(!*s) return false;
282
-    int n = 0;
283
-    while(isdigit(*s)) n = n*10 + (*s++ - '0');
284
-    return n >= low && n <= high;
285
-}
286
-
287
-static bool checkmesaversion(const char *s, int major, int minor, int patch)
288
-{
289
-    const char *v = strstr(s, "Mesa");
290
-    if(!v) return false;
291
-    int vmajor = 0, vminor = 0, vpatch = 0;
292
-    if(sscanf(v, "Mesa %d.%d.%d", &vmajor, &vminor, &vpatch) < 1) return false;
293
-    if(vmajor > major) return true; else if(vmajor < major) return false;
294
-    if(vminor > minor) return true; else if(vminor < minor) return false;
295
-    return vpatch >= patch;
296
-}
297
-
298 276
 VAR(dbgexts, 0, 0, 1);
299 277
 
300 278
 hashset<const char *> glexts;

+ 1
- 2
src/engine/renderlights.cc View File

@@ -64,7 +64,6 @@ void setupbloom(int w, int h)
64 64
         glBindBuffer_(GL_PIXEL_PACK_BUFFER, 0);
65 65
     }
66 66
 
67
-    static const uchar gray[12] = { 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32 };
68 67
     static const float grayf[12] = { 0.125f, 0.125f, 0.125f, 0.125f, 0.125f, 0.125f, 0.125f, 0.125f, 0.125f, 0.125f, 0.125f, 0.125f };
69 68
     createtexture(bloomtex[4], bloompbo ? 4 : 1, 1, (const void *)grayf, 3, 1, GL_R16F);
70 69
 
@@ -182,7 +181,7 @@ void setupao(int w, int h)
182 181
     delete[] noise;
183 182
 
184 183
     bool upscale = aoreduce && aobilateral && aobilateralupscale;
185
-    GLenum format = aoprec && GL_R8,
184
+    GLenum format = aoprec ? GL_R8 : GL_RGBA8,
186 185
            packformat = aobilateral && aopackdepth ? (aodepthformat ? GL_RG16F : GL_RGBA8) : format;
187 186
     int packfilter = upscale && aopackdepth && !aodepthformat ? 0 : 1;
188 187
     loopi(upscale ? 3 : 2)

Loading…
Cancel
Save