mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
update_texture should always make sure that there is a texture created, even if there is no image available
This commit is contained in:
parent
128f82863e
commit
8beac06328
@ -3690,7 +3690,7 @@ update_texture(TextureContext *tc, bool force) {
|
|||||||
|
|
||||||
CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tc);
|
CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tc);
|
||||||
|
|
||||||
if (gtc->was_image_modified()) {
|
if (gtc->was_image_modified() || !gtc->_already_applied) {
|
||||||
// If the texture image was modified, reload the texture. This
|
// If the texture image was modified, reload the texture. This
|
||||||
// means we also re-specify the properties for good measure.
|
// means we also re-specify the properties for good measure.
|
||||||
specify_texture(gtc);
|
specify_texture(gtc);
|
||||||
|
@ -1540,7 +1540,7 @@ update_shader_texture_bindings(CLP(ShaderContext) *prev, GSG *gsg) {
|
|||||||
CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tex->prepare_now(view, gsg->_prepared_objects, gsg));
|
CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tex->prepare_now(view, gsg->_prepared_objects, gsg));
|
||||||
if (gtc != (TextureContext*)NULL) {
|
if (gtc != (TextureContext*)NULL) {
|
||||||
gl_tex = gtc->_index;
|
gl_tex = gtc->_index;
|
||||||
gsg->update_texture(gtc, false);
|
gsg->update_texture(gtc, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user