mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
glgsg: fix unnecessary create-delete-create of new textures
This commit is contained in:
parent
12e71ff1a6
commit
802a08b146
@ -5850,7 +5850,8 @@ prepare_texture(Texture *tex, int view) {
|
||||
report_my_gl_errors();
|
||||
// Make sure we'll support this texture when it's rendered. Don't bother to
|
||||
// prepare it if we won't.
|
||||
switch (tex->get_texture_type()) {
|
||||
Texture::TextureType texture_type = tex->get_texture_type();
|
||||
switch (texture_type) {
|
||||
case Texture::TT_3d_texture:
|
||||
if (!_supports_3d_texture) {
|
||||
GLCAT.warning()
|
||||
@ -5896,6 +5897,7 @@ prepare_texture(Texture *tex, int view) {
|
||||
}
|
||||
|
||||
CLP(TextureContext) *gtc = new CLP(TextureContext)(this, _prepared_objects, tex, view);
|
||||
gtc->_target = get_texture_target(texture_type);
|
||||
report_my_gl_errors();
|
||||
|
||||
return gtc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user