/[gzz]/gzz/gfx/libtexture/filereader.texture
ViewVC logotype

Diff of /gzz/gfx/libtexture/filereader.texture

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jvk, Fri Aug 30 10:31:00 2002 UTC revision 1.2 by jvk, Fri Aug 30 11:14:28 2002 UTC
# Line 5  Line 5 
5    
6  void GENERATE(TextureParam *params, int width, int height, int depth, int components, float *data) {  void GENERATE(TextureParam *params, int width, int height, int depth, int components, float *data) {
7    
8      FPARAM(scale, 1.0);
9      FPARAM(bias, 0);
10    
11    const char *file = params->getString("file", "");    const char *file = params->getString("file", "");
12    FILE *f = fopen(file, "r");    FILE *f = fopen(file, "r");
13    if (!f) {    if (!f) {
# Line 39  void GENERATE(TextureParam *params, int Line 42  void GENERATE(TextureParam *params, int
42              j < y || j >= y + height ||              j < y || j >= y + height ||
43              k < z || k >= z + depth) continue;              k < z || k >= z + depth) continue;
44    
45          if (components >= 1) data[ind++] = foo[0%c];          if (components >= 1) data[ind++] = scale*foo[0%c]+bias;
46          if (components >= 2) data[ind++] = foo[1%c];          if (components >= 2) data[ind++] = scale*foo[1%c]+bias;
47          if (components >= 3) data[ind++] = foo[2%c];          if (components >= 3) data[ind++] = scale*foo[2%c]+bias;
48          if (components >= 4) data[ind++] = foo[3%c];          if (components >= 4) data[ind++] = scale*foo[3%c]+bias;
49        }        }
50      }      }
51    }    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26