41 qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
42 qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
59 float frow, fcol, size;
63 if ( (num&127) == 32 )
81 qglTexCoord2f (fcol, frow);
83 qglTexCoord2f (fcol + size, frow);
84 qglVertex2f (
x+8*scale->
value,
y);
85 qglTexCoord2f (fcol + size, frow + size);
87 qglTexCoord2f (fcol, frow + size);
88 qglVertex2f (
x,
y+8*scale->
value);
102 if (
name[0] !=
'/' &&
name[0] !=
'\\')
155 qglDisable (GL_ALPHA_TEST);
159 qglTexCoord2f (gl->
sl, gl->
tl);
161 qglTexCoord2f (gl->
sh, gl->
tl);
162 qglVertex2f (
x+
w,
y);
163 qglTexCoord2f (gl->
sh, gl->
th);
164 qglVertex2f (
x+
w,
y+h);
165 qglTexCoord2f (gl->
sl, gl->
th);
166 qglVertex2f (
x,
y+h);
170 qglEnable (GL_ALPHA_TEST);
194 qglDisable (GL_ALPHA_TEST);
198 qglTexCoord2f (gl->
sl, gl->
tl);
200 qglTexCoord2f (gl->
sh, gl->
tl);
202 qglTexCoord2f (gl->
sh, gl->
th);
204 qglTexCoord2f (gl->
sl, gl->
th);
209 qglEnable (GL_ALPHA_TEST);
232 qglDisable (GL_ALPHA_TEST);
236 qglTexCoord2f (
x/64.0,
y/64.0);
238 qglTexCoord2f ( (
x+
w)/64.0,
y/64.0);
239 qglVertex2f (
x+
w,
y);
240 qglTexCoord2f ( (
x+
w)/64.0, (
y+h)/64.0);
241 qglVertex2f (
x+
w,
y+h);
242 qglTexCoord2f (
x/64.0, (
y+h)/64.0 );
243 qglVertex2f (
x,
y+h);
247 qglEnable (GL_ALPHA_TEST);
266 if ( (
unsigned)c > 255)
269 qglDisable (GL_TEXTURE_2D);
272 qglColor3f (color.v[0]/255.0,
279 qglVertex2f (
x+
w,
y);
280 qglVertex2f (
x+
w,
y+h);
281 qglVertex2f (
x,
y+h);
285 qglEnable (GL_TEXTURE_2D);
298 qglEnable (GL_BLEND);
299 qglDisable (GL_TEXTURE_2D);
300 qglColor4f (0, 0, 0, 0.8);
309 qglColor4f (1,1,1,1);
310 qglEnable (GL_TEXTURE_2D);
311 qglDisable (GL_BLEND);
327 unsigned image32[256*256];
328 unsigned char image8[256*256];
348 t = rows*hscale / 256;
350 if ( !qglColorTableEXT )
354 for (
i=0 ;
i<trows ;
i++)
356 row = (
int)(
i*hscale);
359 source = data + cols*row;
360 dest = &image32[
i*256];
361 fracstep = cols*0x10000/256;
362 frac = fracstep >> 1;
363 for (
j=0 ;
j<256 ;
j++)
370 qglTexImage2D (GL_TEXTURE_2D, 0,
gl_tex_solid_format, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, image32);
376 for (
i=0 ;
i<trows ;
i++)
378 row = (
int)(
i*hscale);
381 source = data + cols*row;
382 dest = &image8[
i*256];
383 fracstep = cols*0x10000/256;
384 frac = fracstep >> 1;
385 for (
j=0 ;
j<256 ;
j++)
387 dest[
j] = source[frac>>16];
392 qglTexImage2D( GL_TEXTURE_2D,
401 qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
402 qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
405 qglDisable (GL_ALPHA_TEST);
408 qglTexCoord2f (0, 0);
410 qglTexCoord2f (1, 0);
411 qglVertex2f (
x+
w,
y);
412 qglTexCoord2f (1,
t);
413 qglVertex2f (
x+
w,
y+h);
414 qglTexCoord2f (0,
t);
415 qglVertex2f (
x,
y+h);
419 qglEnable (GL_ALPHA_TEST);