mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
Fix constant reloading of texture when using gl-ignore-mipmaps
This commit is contained in:
parent
d574dd4b0b
commit
375baaaabd
@ -10526,9 +10526,13 @@ apply_sampler(GLuint unit, const SamplerState &sampler, TextureContext *tc) {
|
||||
}
|
||||
}
|
||||
|
||||
if (sampler.uses_mipmaps() && !gtc->_uses_mipmaps) {
|
||||
if (sampler.uses_mipmaps() && !gtc->_uses_mipmaps && !gl_ignore_mipmaps) {
|
||||
// The texture wasn't created with mipmaps, but we are trying
|
||||
// to sample it with mipmaps. We will need to reload it.
|
||||
GLCAT.info()
|
||||
<< "reloading texture " << gtc->get_texture()->get_name()
|
||||
<< " with mipmaps\n";
|
||||
|
||||
apply_texture(tc);
|
||||
gtc->mark_needs_reload();
|
||||
bool okflag = upload_texture(gtc, false, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user