Lines Matching defs:Tx

33 static TEXTURE *Tx, t1, t2, t3;
128 PrintString(TextureName(Tx->TC));
129 if (Tx->cData) {
133 PrintString(TextureName(Tx->cFormat));
136 sprintf(tmp, "%d (%d%% of %d)", Tx->cSize, Tx->cSize * 100 / Tx->size, Tx->size);
155 static void ReInit( GLenum TC, TEXTURE *Tx )
159 if ((Tx->TC == TC) && (Tx->cData != NULL)) {
162 Tx->cFormat, /* real format */
163 Tx->w, /* original width */
164 Tx->h, /* original height */
166 Tx->cSize, /* compressed size*/
167 Tx->cData); /* compressed data*/
172 Tx->w, Tx->h, /* width, height */
174 Tx->format, /* texture format */
176 Tx->data); /* the texture */
197 Tx->TC = TC;
198 if (Tx->cData != NULL) {
199 free(Tx->cData);
200 Tx->cData = NULL;
204 glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, (GLint *)&Tx->cFormat);
205 glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, (GLint *)&Tx->cSize);
206 if ((Tx->cData = malloc(Tx->cSize)) != NULL) {
207 glGetCompressedTexImageARB(GL_TEXTURE_2D, 0, Tx->cData);
298 ReInit(GL_RGBA, Tx = &t1);
326 if (Tx == &t1) {
327 Tx = &t2;
328 } else if (Tx == &t2) {
329 Tx = &t3;
331 Tx = &t1;
333 ReInit(Tx->TC, Tx);
336 ReInit(GL_RGB, Tx);
339 ReInit(GL_RGBA, Tx);
342 ReInit(GL_COMPRESSED_RGB, Tx);
345 ReInit(GL_COMPRESSED_RGBA, Tx);
348 if (fxt1) ReInit(GL_COMPRESSED_RGB_FXT1_3DFX, Tx);
351 if (fxt1) ReInit(GL_COMPRESSED_RGBA_FXT1_3DFX, Tx);
354 if (dxtc) ReInit(GL_COMPRESSED_RGB_S3TC_DXT1_EXT, Tx);
357 if (dxtc) ReInit(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, Tx);
360 if (dxtc) ReInit(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, Tx);
363 if (dxtc) ReInit(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, Tx);
366 if (s3tc) ReInit(GL_RGB_S3TC, Tx);
369 if (s3tc) ReInit(GL_RGB4_S3TC, Tx);
372 if (s3tc) ReInit(GL_RGBA_S3TC, Tx);
375 if (s3tc) ReInit(GL_RGBA4_S3TC, Tx);