*** empty log message ***

This commit is contained in:
David Rose 2000-11-22 18:43:52 +00:00
parent b7802a39f8
commit f20fceb551
1 changed files with 24 additions and 1 deletions

View File

@ -3408,7 +3408,30 @@ apply_texture_immediate(Texture *tex) {
<< pb->get_border() << ", " << (int)external_format << ", "
<< (int)type << ", " << tex->get_name() << ")\n";
#endif
glTexImage2D( GL_TEXTURE_2D, tex->get_level(), internal_format,
if (!gl_ignore_mipmaps) {
bool use_mipmaps;
switch (tex->get_minfilter()) {
case Texture::FT_nearest_mipmap_nearest:
case Texture::FT_linear_mipmap_nearest:
case Texture::FT_nearest_mipmap_linear:
case Texture::FT_linear_mipmap_linear:
use_mipmaps = true;
break;
default:
use_mipmaps = false;
break;
}
if (use_mipmaps) {
gluBuild2DMipmaps(GL_TEXTURE_2D, internal_format,
pb->get_xsize(), pb->get_ysize(),
external_format, type, pb->_image);
return;
}
}
glTexImage2D( GL_TEXTURE_2D, 0, internal_format,
pb->get_xsize(), pb->get_ysize(), pb->get_border(),
external_format, type, pb->_image );
}