157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
return true;
}
// management of texture slots
// each texture slot can have multople texture frames, of which currently only
// the first is used additional frames can be used for various shaders
static const int MAXTEX = 1000;
static int texx[MAXTEX]; // ( loaded texture ) -> ( name, size )
static int texy[MAXTEX];
static OFString *texname[MAXTEX];
static int curtex = 0;
static const int FIRSTTEX = 1000; // opengl id = loaded id + FIRSTTEX
// std 1+, sky 14+, mdls 20+
static const int MAXFRAMES = 2; // increase to allow more complex shader defs
static int mapping[256]
[MAXFRAMES]; // ( cube texture, frame ) -> ( opengl id, name )
static OFString *mapname[256][MAXFRAMES];
void
purgetextures()
{
loopi(256) loop(j, MAXFRAMES) mapping[i][j] = 0;
}
|
|
|
|
|
>
|
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
return true;
}
// management of texture slots
// each texture slot can have multople texture frames, of which currently only
// the first is used additional frames can be used for various shaders
#define MAXTEX 1000
static int texx[MAXTEX]; // ( loaded texture ) -> ( name, size )
static int texy[MAXTEX];
static OFString *texname[MAXTEX];
static int curtex = 0;
static const int FIRSTTEX = 1000; // opengl id = loaded id + FIRSTTEX
// std 1+, sky 14+, mdls 20+
// increase to allow more complex shader defs
#define MAXFRAMES 2
// ( cube texture, frame ) -> ( opengl id, name )
static int mapping[256][MAXFRAMES];
static OFString *mapname[256][MAXFRAMES];
void
purgetextures()
{
loopi(256) loop(j, MAXFRAMES) mapping[i][j] = 0;
}
|