Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2017-09-12 00:15:29 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-09-12 00:15:29 +0300
commitd126ffbea4fc549072100022c8be15bd4e3f62ca (patch)
tree5360575e84f51c903a37ed4be28d3d4810ce3eb1 /source/blender/gpu/intern/gpu_uniformbuffer.c
parent4757404eef04267880ed114823332818087e8aee (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.c5
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;