DrwManager: Remove the need for buffers to be available.

This way we can just avoid binding a texture by setting it's ref to NULL.
This commit is contained in:
Clément Foucault 2017-06-16 15:11:23 +02:00
parent 6dbe2b0385
commit 539225db81
1 changed files with 4 additions and 0 deletions

View File

@ -1733,6 +1733,10 @@ static void draw_shgroup(DRWShadingGroup *shgroup, DRWState pass_state)
break;
}
tex = *((GPUTexture **)uni->value);
if (tex == NULL) {
/* In case texture is not yet available */
break;
}
GPU_texture_bind(tex, uni->bindloc);
bound_tex = MEM_callocN(sizeof(DRWBoundTexture), "DRWBoundTexture");