diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-09-12 00:15:29 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-09-12 00:15:29 +0300 |
commit | d126ffbea4fc549072100022c8be15bd4e3f62ca (patch) | |
tree | 5360575e84f51c903a37ed4be28d3d4810ce3eb1 /source/blender/gpu/intern/gpu_uniformbuffer.c | |
parent | 4757404eef04267880ed114823332818087e8aee (diff) |
DRW: Use static list (array) of texture/ubo to track bound textures/ubos.
This is in order to use the same texture on multiple sampler.
Also texture counter is reset after each shading group. This mimics the previous behaviour.
Diffstat (limited to 'source/blender/gpu/intern/gpu_uniformbuffer.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_uniformbuffer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_uniformbuffer.c b/source/blender/gpu/intern/gpu_uniformbuffer.c index 46cf9d19a47..652cd38b16b 100644 --- a/source/blender/gpu/intern/gpu_uniformbuffer.c +++ b/source/blender/gpu/intern/gpu_uniformbuffer.c @@ -356,6 +356,11 @@ void GPU_uniformbuffer_bind(GPUUniformBuffer *ubo, int number) ubo->bindpoint = number; } +void GPU_uniformbuffer_unbind(GPUUniformBuffer *ubo) +{ + ubo->bindpoint = -1; +} + int GPU_uniformbuffer_bindpoint(GPUUniformBuffer *ubo) { return ubo->bindpoint; |