update_texture should always make sure that there is a texture created, even if there is no image available

This commit is contained in:
rdb 2014-06-20 15:04:39 +00:00
parent 128f82863e
commit 8beac06328
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);
} }
} }