Ignore:
Timestamp:
May 23, 2000, 10:41:28 PM (25 years ago)
Author:
jeroen
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/opengl/mesa/texture.c

    r2962 r3598  
    1 /* $Id: texture.c,v 1.2 2000-03-01 18:49:37 jeroen Exp $ */
     1/* $Id: texture.c,v 1.3 2000-05-23 20:40:57 jeroen Exp $ */
    22
    33/*
    44 * Mesa 3-D graphics library
    5  * Version:  3.1
     5 * Version:  3.3
    66 *
    77 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
     
    2929#include "all.h"
    3030#else
    31 #ifndef XFree86Server
    32 #include <math.h>
    33 #include <stdlib.h>
    34 #include <stdio.h>
    35 #else
    36 #include "GL/xf86glx.h"
    37 #endif
     31#include "glheader.h"
    3832#include "types.h"
    3933#include "context.h"
     
    141135}
    142136
     137
     138/*
     139 * After state changes to texturing we call this function to update
     140 * intermediate and derived state.
     141 * Called by gl_update_state().
     142 */
     143void gl_update_texture_unit( GLcontext *ctx, struct gl_texture_unit *texUnit )
     144{
     145   (void) ctx;
     146
     147   if ((texUnit->Enabled & TEXTURE0_3D) && texUnit->CurrentD[3]->Complete) {
     148      texUnit->ReallyEnabled = TEXTURE0_3D;
     149      texUnit->Current = texUnit->CurrentD[3];
     150      texUnit->CurrentDimension = 3;
     151      goto utex_cont;
     152   }
     153   if ((texUnit->Enabled & TEXTURE0_2D) && texUnit->CurrentD[2]->Complete) {
     154      texUnit->ReallyEnabled = TEXTURE0_2D;
     155      texUnit->Current = texUnit->CurrentD[2];
     156      texUnit->CurrentDimension = 2;
     157      goto utex_cont;
     158   }
     159   if ((texUnit->Enabled & TEXTURE0_1D) && texUnit->CurrentD[1]->Complete) {
     160      texUnit->ReallyEnabled = TEXTURE0_1D;
     161      texUnit->Current = texUnit->CurrentD[1];
     162      texUnit->CurrentDimension = 1;
     163      goto utex_cont;
     164   }
     165   {
     166/*    if (MESA_VERBOSE & VERBOSE_TEXTURE) {
     167         switch (texUnit->Enabled) {
     168         case TEXTURE0_3D:
     169            fprintf(stderr, "Using incomplete 3d texture %u\n",
     170                    texUnit->CurrentD[3]->Name);
     171            break;
     172         case TEXTURE0_2D:
     173            fprintf(stderr, "Using incomplete 2d texture %u\n",
     174                    texUnit->CurrentD[2]->Name);
     175            break;
     176         case TEXTURE0_1D:
     177            fprintf(stderr, "Using incomplete 1d texture %u\n",
     178                    texUnit->CurrentD[1]->Name);
     179            break;
     180         default:
     181            fprintf(stderr, "Bad value for texUnit->Enabled %x\n",
     182                    texUnit->Enabled);
     183            break;
     184         }
     185      }      */
     186
     187      texUnit->ReallyEnabled = 0;
     188      texUnit->Current = NULL;
     189      texUnit->CurrentDimension = 0;
     190      return;
     191   }
     192
     193utex_cont:
     194
     195   texUnit->GenFlags = 0;
     196
     197   if (texUnit->TexGenEnabled) {
     198      GLuint sz = 0;
     199
     200      if (texUnit->TexGenEnabled & S_BIT) {
     201         sz = 1;
     202         texUnit->GenFlags |= texUnit->GenBitS;
     203      }
     204      if (texUnit->TexGenEnabled & T_BIT) {
     205         sz = 2;
     206         texUnit->GenFlags |= texUnit->GenBitT;
     207      }
     208      if (texUnit->TexGenEnabled & Q_BIT) {
     209         sz = 3;
     210         texUnit->GenFlags |= texUnit->GenBitQ;
     211      }
     212      if (texUnit->TexGenEnabled & R_BIT) {
     213         sz = 4;
     214         texUnit->GenFlags |= texUnit->GenBitR;
     215      }
     216
     217      texUnit->TexgenSize = sz;
     218      texUnit->Holes = (GLubyte) (all_bits[sz] & ~texUnit->TexGenEnabled);
     219      texUnit->func = texgen_generic_tab;
     220
     221      if (texUnit->TexGenEnabled == (S_BIT|T_BIT|R_BIT)) {
     222         if (texUnit->GenFlags == TEXGEN_REFLECTION_MAP_NV) {
     223            texUnit->func = texgen_reflection_map_nv_tab;
     224         }
     225         else if (texUnit->GenFlags == TEXGEN_NORMAL_MAP_NV) {
     226            texUnit->func = texgen_normal_map_nv_tab;
     227         }
     228      }
     229      else if (texUnit->TexGenEnabled == (S_BIT|T_BIT) &&
     230               texUnit->GenFlags == TEXGEN_SPHERE_MAP) {
     231         texUnit->func = texgen_sphere_map_tab;
     232      }
     233   }
     234}
     235
     236
     237
    143238/*
    144239 * Paletted texture sampling.
     
    150245                           GLubyte index, GLubyte rgba[4] )
    151246{
    152    GLcontext *ctx = gl_get_current_context();  /* THIS IS A HACK */
     247   GLcontext *ctx = gl_get_current_context();             /* THIS IS A HACK*/
    153248   GLint i = index;
    154249   const GLubyte *palette;
     250   GLenum format;
    155251
    156252   if (ctx->Texture.SharedPalette) {
    157       palette = ctx->Texture.Palette;
     253      palette = ctx->Texture.Palette.Table;
     254      format = ctx->Texture.Palette.Format;
    158255   }
    159256   else {
    160       palette = tObj->Palette;
    161    }
    162 
    163    switch (tObj->PaletteFormat) {
     257      palette = tObj->Palette.Table;
     258      format = tObj->Palette.Format;
     259   }
     260
     261   switch (format) {
    164262      case GL_ALPHA:
    165          rgba[ACOMP] = tObj->Palette[index];
     263         rgba[ACOMP] = palette[index];
    166264         return;
    167265      case GL_LUMINANCE:
     
    314412#ifdef DEBUG
    315413   GLint width = img->Width;
    316    assert(i >= 0);
    317    assert(i < width);
     414   ASSERT(i >= 0);
     415   ASSERT(i < width);
    318416#endif
    319417
     
    448546
    449547      if (useBorderColor & I0BIT) {
    450          t0[RCOMP] = tObj->BorderColor[0];
    451          t0[GCOMP] = tObj->BorderColor[1];
    452          t0[BCOMP] = tObj->BorderColor[2];
    453          t0[ACOMP] = tObj->BorderColor[3];
     548         COPY_4UBV(t0, tObj->BorderColor);
    454549      }
    455550      else {
     
    457552      }
    458553      if (useBorderColor & I1BIT) {
    459          t1[RCOMP] = tObj->BorderColor[0];
    460          t1[GCOMP] = tObj->BorderColor[1];
    461          t1[BCOMP] = tObj->BorderColor[2];
    462          t1[ACOMP] = tObj->BorderColor[3];
     554         COPY_4UBV(t1, tObj->BorderColor);
    463555      }
    464556      else {
     
    682774#ifdef DEBUG
    683775   const GLint height = img->Height;  /* includes border */
    684    assert(i >= 0);
    685    assert(i < width);
    686    assert(j >= 0);
    687    assert(j < height);
     776   ASSERT(i >= 0);
     777   ASSERT(i < width);
     778   ASSERT(j >= 0);
     779   ASSERT(j < height);
    688780#endif
    689781
     
    833925
    834926      if (useBorderColor & (I0BIT | J0BIT)) {
    835          t00[RCOMP] = tObj->BorderColor[0];
    836          t00[GCOMP] = tObj->BorderColor[1];
    837          t00[BCOMP] = tObj->BorderColor[2];
    838          t00[ACOMP] = tObj->BorderColor[3];
     927         COPY_4UBV(t00, tObj->BorderColor);
    839928      }
    840929      else {
     
    842931      }
    843932      if (useBorderColor & (I1BIT | J0BIT)) {
    844          t10[RCOMP] = tObj->BorderColor[0];
    845          t10[GCOMP] = tObj->BorderColor[1];
    846          t10[BCOMP] = tObj->BorderColor[2];
    847          t10[ACOMP] = tObj->BorderColor[3];
     933         COPY_4UBV(t10, tObj->BorderColor);
    848934      }
    849935      else {
     
    851937      }
    852938      if (useBorderColor & (I0BIT | J1BIT)) {
    853          t01[RCOMP] = tObj->BorderColor[0];
    854          t01[GCOMP] = tObj->BorderColor[1];
    855          t01[BCOMP] = tObj->BorderColor[2];
    856          t01[ACOMP] = tObj->BorderColor[3];
     939         COPY_4UBV(t01, tObj->BorderColor);
    857940      }
    858941      else {
     
    860943      }
    861944      if (useBorderColor & (I1BIT | J1BIT)) {
    862          t11[RCOMP] = tObj->BorderColor[0];
    863          t11[GCOMP] = tObj->BorderColor[1];
    864          t11[BCOMP] = tObj->BorderColor[2];
    865          t11[ACOMP] = tObj->BorderColor[3];
     945         COPY_4UBV(t11, tObj->BorderColor);
    866946      }
    867947      else {
     
    11661246#ifdef DEBUG
    11671247   const GLint depth = img->Depth;    /* includes border */
    1168    assert(i >= 0);
    1169    assert(i < width);
    1170    assert(j >= 0);
    1171    assert(j < height);
    1172    assert(k >= 0);
    1173    assert(k < depth);
     1248   ASSERT(i >= 0);
     1249   ASSERT(i < width);
     1250   ASSERT(j >= 0);
     1251   ASSERT(j < height);
     1252   ASSERT(k >= 0);
     1253   ASSERT(k < depth);
    11741254#endif
    11751255
     
    13281408
    13291409      if (useBorderColor & (I0BIT | J0BIT | K0BIT)) {
    1330          t000[RCOMP] = tObj->BorderColor[0];
    1331          t000[GCOMP] = tObj->BorderColor[1];
    1332          t000[BCOMP] = tObj->BorderColor[2];
    1333          t000[ACOMP] = tObj->BorderColor[3];
     1410         COPY_4UBV(t000, tObj->BorderColor);
    13341411      }
    13351412      else {
     
    13371414      }
    13381415      if (useBorderColor & (I1BIT | J0BIT | K0BIT)) {
    1339          t100[RCOMP] = tObj->BorderColor[0];
    1340          t100[GCOMP] = tObj->BorderColor[1];
    1341          t100[BCOMP] = tObj->BorderColor[2];
    1342          t100[ACOMP] = tObj->BorderColor[3];
     1416         COPY_4UBV(t100, tObj->BorderColor);
    13431417      }
    13441418      else {
     
    13461420      }
    13471421      if (useBorderColor & (I0BIT | J1BIT | K0BIT)) {
    1348          t010[RCOMP] = tObj->BorderColor[0];
    1349          t010[GCOMP] = tObj->BorderColor[1];
    1350          t010[BCOMP] = tObj->BorderColor[2];
    1351          t010[ACOMP] = tObj->BorderColor[3];
     1422         COPY_4UBV(t010, tObj->BorderColor);
    13521423      }
    13531424      else {
     
    13551426      }
    13561427      if (useBorderColor & (I1BIT | J1BIT | K0BIT)) {
    1357          t110[RCOMP] = tObj->BorderColor[0];
    1358          t110[GCOMP] = tObj->BorderColor[1];
    1359          t110[BCOMP] = tObj->BorderColor[2];
    1360          t110[ACOMP] = tObj->BorderColor[3];
     1428         COPY_4UBV(t110, tObj->BorderColor);
    13611429      }
    13621430      else {
     
    13651433
    13661434      if (useBorderColor & (I0BIT | J0BIT | K1BIT)) {
    1367          t001[RCOMP] = tObj->BorderColor[0];
    1368          t001[GCOMP] = tObj->BorderColor[1];
    1369          t001[BCOMP] = tObj->BorderColor[2];
    1370          t001[ACOMP] = tObj->BorderColor[3];
     1435         COPY_4UBV(t001, tObj->BorderColor);
    13711436      }
    13721437      else {
     
    13741439      }
    13751440      if (useBorderColor & (I1BIT | J0BIT | K1BIT)) {
    1376          t101[RCOMP] = tObj->BorderColor[0];
    1377          t101[GCOMP] = tObj->BorderColor[1];
    1378          t101[BCOMP] = tObj->BorderColor[2];
    1379          t101[ACOMP] = tObj->BorderColor[3];
     1441         COPY_4UBV(t101, tObj->BorderColor);
    13801442      }
    13811443      else {
     
    13831445      }
    13841446      if (useBorderColor & (I0BIT | J1BIT | K1BIT)) {
    1385          t011[RCOMP] = tObj->BorderColor[0];
    1386          t011[GCOMP] = tObj->BorderColor[1];
    1387          t011[BCOMP] = tObj->BorderColor[2];
    1388          t011[ACOMP] = tObj->BorderColor[3];
     1447         COPY_4UBV(t011, tObj->BorderColor);
    13891448      }
    13901449      else {
     
    13921451      }
    13931452      if (useBorderColor & (I1BIT | J1BIT | K1BIT)) {
    1394          t111[RCOMP] = tObj->BorderColor[0];
    1395          t111[GCOMP] = tObj->BorderColor[1];
    1396          t111[BCOMP] = tObj->BorderColor[2];
    1397          t111[ACOMP] = tObj->BorderColor[3];
     1453         COPY_4UBV(t111, tObj->BorderColor);
    13981454      }
    13991455      else {
     
    16951751 *                according to the texture environment mode.
    16961752 */
    1697 
    1698 
    16991753static void apply_texture( const GLcontext *ctx,
    17001754                           const struct gl_texture_unit *texUnit,
     
    17061760   GLenum format;
    17071761
    1708 /*
    1709  * Use (A*(B+1)) >> 8 as a fast approximation of (A*B)/255 for A
    1710  * and B in [0,255]
    1711  */
    1712 
    1713 #define PROD(A,B) ( (GLubyte) (((GLint)(A) * ((GLint)(B)+1)) >> 8) )
    1714 
    17151762   ASSERT(texUnit);
    17161763   ASSERT(texUnit->Current);
     
    17181765
    17191766   format = texUnit->Current->Image[0]->Format;
     1767
     1768/*
     1769 * Use (A*(B+1)) >> 8 as a fast approximation of (A*B)/255 for A
     1770 * and B in [0,255]
     1771 */
     1772#define PROD(A,B)   ( (GLubyte) (((GLint)(A) * ((GLint)(B)+1)) >> 8) )
    17201773
    17211774   if (format==GL_COLOR_INDEX) {
     
    17791832               break;
    17801833            default:
    1781                gl_problem(ctx, "Bad format in apply_texture");
     1834               gl_problem(ctx, "Bad format (GL_REPLACE) in apply_texture");
    17821835               return;
    17831836         }
     
    18451898               break;
    18461899            default:
    1847                gl_problem(ctx, "Bad format (2) in apply_texture");
     1900               gl_problem(ctx, "Bad format (GL_MODULATE) in apply_texture");
    18481901               return;
    18491902         }
     
    18781931               break;
    18791932            default:
    1880                gl_problem(ctx, "Bad format (3) in apply_texture");
     1933               gl_problem(ctx, "Bad format (GL_DECAL) in apply_texture");
    18811934               return;
    18821935         }
     
    19482001               break;
    19492002            default:
    1950                gl_problem(ctx, "Bad format (4) in apply_texture");
     2003               gl_problem(ctx, "Bad format (GL_BLEND) in apply_texture");
     2004               return;
     2005         }
     2006         break;
     2007
     2008      case GL_ADD:  /* GL_EXT_texture_add_env */
     2009         switch (format) {
     2010            case GL_ALPHA:
     2011               for (i=0;i<n;i++) {
     2012                  /* Rv = Rf */
     2013                  /* Gv = Gf */
     2014                  /* Bv = Bf */
     2015                  rgba[i][ACOMP] = PROD(rgba[i][ACOMP], texel[i][ACOMP]);
     2016               }
     2017               break;
     2018            case GL_LUMINANCE:
     2019               for (i=0;i<n;i++) {
     2020                  GLuint Lt = texel[i][RCOMP];
     2021                  GLuint r = rgba[i][RCOMP] + Lt;
     2022                  GLuint g = rgba[i][GCOMP] + Lt;
     2023                  GLuint b = rgba[i][BCOMP] + Lt;
     2024                  rgba[i][RCOMP] = r < 256 ? (GLubyte) r : 255;
     2025                  rgba[i][GCOMP] = g < 256 ? (GLubyte) g : 255;
     2026                  rgba[i][BCOMP] = b < 256 ? (GLubyte) b : 255;
     2027                  /* Av = Af */
     2028               }
     2029               break;
     2030            case GL_LUMINANCE_ALPHA:
     2031               for (i=0;i<n;i++) {
     2032                  GLuint Lt = texel[i][RCOMP];
     2033                  GLuint r = rgba[i][RCOMP] + Lt;
     2034                  GLuint g = rgba[i][GCOMP] + Lt;
     2035                  GLuint b = rgba[i][BCOMP] + Lt;
     2036                  rgba[i][RCOMP] = r < 256 ? (GLubyte) r : 255;
     2037                  rgba[i][GCOMP] = g < 256 ? (GLubyte) g : 255;
     2038                  rgba[i][BCOMP] = b < 256 ? (GLubyte) b : 255;
     2039                  rgba[i][ACOMP] = PROD(rgba[i][ACOMP], texel[i][ACOMP]);
     2040               }
     2041               break;
     2042            case GL_INTENSITY:
     2043               for (i=0;i<n;i++) {
     2044                  GLubyte It = texel[i][RCOMP];
     2045                  GLuint r = rgba[i][RCOMP] + It;
     2046                  GLuint g = rgba[i][GCOMP] + It;
     2047                  GLuint b = rgba[i][BCOMP] + It;
     2048                  GLuint a = rgba[i][ACOMP] + It;
     2049                  rgba[i][RCOMP] = r < 256 ? (GLubyte) r : 255;
     2050                  rgba[i][GCOMP] = g < 256 ? (GLubyte) g : 255;
     2051                  rgba[i][BCOMP] = b < 256 ? (GLubyte) b : 255;
     2052                  rgba[i][ACOMP] = a < 256 ? (GLubyte) a : 255;
     2053               }
     2054               break;
     2055            case GL_RGB:
     2056               for (i=0;i<n;i++) {
     2057                  GLuint r = rgba[i][RCOMP] + texel[i][RCOMP];
     2058                  GLuint g = rgba[i][GCOMP] + texel[i][GCOMP];
     2059                  GLuint b = rgba[i][BCOMP] + texel[i][BCOMP];
     2060                  rgba[i][RCOMP] = r < 256 ? (GLubyte) r : 255;
     2061                  rgba[i][GCOMP] = g < 256 ? (GLubyte) g : 255;
     2062                  rgba[i][BCOMP] = b < 256 ? (GLubyte) b : 255;
     2063                  /* Av = Af */
     2064               }
     2065               break;
     2066            case GL_RGBA:
     2067               for (i=0;i<n;i++) {
     2068                  GLuint r = rgba[i][RCOMP] + texel[i][RCOMP];
     2069                  GLuint g = rgba[i][GCOMP] + texel[i][GCOMP];
     2070                  GLuint b = rgba[i][BCOMP] + texel[i][BCOMP];
     2071                  rgba[i][RCOMP] = r < 256 ? (GLubyte) r : 255;
     2072                  rgba[i][GCOMP] = g < 256 ? (GLubyte) g : 255;
     2073                  rgba[i][BCOMP] = b < 256 ? (GLubyte) b : 255;
     2074                  rgba[i][ACOMP] = PROD(rgba[i][ACOMP], texel[i][ACOMP]);
     2075               }
     2076               break;
     2077            default:
     2078               gl_problem(ctx, "Bad format (GL_ADD) in apply_texture");
    19512079               return;
    19522080         }
     
    19742102      const struct gl_texture_unit *textureUnit = &ctx->Texture.Unit[texUnit];
    19752103      if (textureUnit->Current && textureUnit->Current->SampleFunc) {
    1976 
    19772104         GLubyte texel[PB_SIZE][4];
     2105
     2106         if (textureUnit->LodBias != 0.0F) {
     2107            /* apply LOD bias, but don't clamp yet */
     2108            GLuint i;
     2109            for (i=0;i<n;i++) {
     2110               lambda[i] += textureUnit->LodBias;
     2111            }
     2112         }
    19782113
    19792114         if (textureUnit->Current->MinLod != -1000.0
     
    19982133   }
    19992134}
    2000 
    2001 /*
    2002  * After state changes to texturing we call this function to update
    2003  * intermediate and derived state.
    2004  * Called by gl_update_state().
    2005  */
    2006 void gl_update_texture_unit( GLcontext *ctx, struct gl_texture_unit *texUnit )
    2007 {
    2008    (void) ctx;
    2009 
    2010    if ((texUnit->Enabled & TEXTURE0_3D) && texUnit->CurrentD[3]->Complete) {
    2011       texUnit->ReallyEnabled = TEXTURE0_3D;
    2012       texUnit->Current = texUnit->CurrentD[3];
    2013       texUnit->CurrentDimension = 3;
    2014    }
    2015    else if ((texUnit->Enabled & TEXTURE0_2D) && texUnit->CurrentD[2]->Complete) {
    2016       texUnit->ReallyEnabled = TEXTURE0_2D;
    2017       texUnit->Current = texUnit->CurrentD[2];
    2018       texUnit->CurrentDimension = 2;
    2019    }
    2020    else if ((texUnit->Enabled & TEXTURE0_1D) && texUnit->CurrentD[1]->Complete) {
    2021       texUnit->ReallyEnabled = TEXTURE0_1D;
    2022       texUnit->Current = texUnit->CurrentD[1];
    2023       texUnit->CurrentDimension = 1;
    2024    }
    2025    else {
    2026   /*  if (MESA_VERBOSE & VERBOSE_TEXTURE) {
    2027          switch (texUnit->Enabled) {
    2028          case TEXTURE0_3D:
    2029             fprintf(stderr, "Using incomplete 3d texture %u\n",
    2030                     texUnit->CurrentD[3]->Name);
    2031             break;
    2032          case TEXTURE0_2D:
    2033             fprintf(stderr, "Using incomplete 2d texture %u\n",
    2034                     texUnit->CurrentD[2]->Name);
    2035             break;
    2036          case TEXTURE0_1D:
    2037             fprintf(stderr, "Using incomplete 1d texture %u\n",
    2038                     texUnit->CurrentD[1]->Name);
    2039             break;
    2040          default:
    2041             fprintf(stderr, "Bad value for texUnit->Enabled %x\n",
    2042                     texUnit->Enabled);
    2043             break;
    2044          }
    2045       }*/
    2046 
    2047       texUnit->ReallyEnabled = 0;
    2048       texUnit->Current = NULL;
    2049       texUnit->CurrentDimension = 0;
    2050       return;
    2051    }
    2052 
    2053    texUnit->GenFlags = 0;
    2054 
    2055    if (texUnit->TexGenEnabled) {
    2056       GLuint sz = 0;
    2057 
    2058       if (texUnit->TexGenEnabled & S_BIT) {
    2059          sz = 1;
    2060          texUnit->GenFlags |= texUnit->GenBitS;
    2061       }
    2062       if (texUnit->TexGenEnabled & T_BIT) {
    2063          sz = 2;
    2064          texUnit->GenFlags |= texUnit->GenBitT;
    2065       }
    2066       if (texUnit->TexGenEnabled & Q_BIT) {
    2067          sz = 3;
    2068          texUnit->GenFlags |= texUnit->GenBitQ;
    2069       }
    2070       if (texUnit->TexGenEnabled & R_BIT) {
    2071          sz = 4;
    2072          texUnit->GenFlags |= texUnit->GenBitR;
    2073       }
    2074 
    2075       texUnit->TexgenSize = sz;
    2076       texUnit->Holes = (GLubyte) (all_bits[sz] & ~texUnit->TexGenEnabled);
    2077       texUnit->func = texgen_generic_tab;
    2078 
    2079       if (texUnit->TexGenEnabled == (S_BIT|T_BIT|R_BIT)) {
    2080          if (texUnit->GenFlags == TEXGEN_REFLECTION_MAP_NV) {
    2081             texUnit->func = texgen_reflection_map_nv_tab;
    2082          }
    2083          else if (texUnit->GenFlags == TEXGEN_NORMAL_MAP_NV) {
    2084             texUnit->func = texgen_normal_map_nv_tab;
    2085          }
    2086       }
    2087       else if (texUnit->TexGenEnabled == (S_BIT|T_BIT) &&
    2088                texUnit->GenFlags == TEXGEN_SPHERE_MAP) {
    2089          texUnit->func = texgen_sphere_map_tab;
    2090       }
    2091    }
    2092 }
Note: See TracChangeset for help on using the changeset viewer.