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:
authorAntony Riakiotakis <kalast@gmail.com>2015-07-21 17:40:58 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-07-21 17:41:13 +0300
commit1df42798d46d031c7666a75b47faa0d20fc965ef (patch)
treea0e70cdbd7c9c453da0d4e04bf9db9cfca87772e /source/blender/gpu/intern/gpu_buffers.c
parent89e5c756665c1e7e622ddbd5deece0dda4ce7724 (diff)
Try to remap buffer before rejecting.
I suspect code here can be cleaned up but for now try this. Alternatively we can check for errors around buffer allocation but this needs bigger changes.
Diffstat (limited to 'source/blender/gpu/intern/gpu_buffers.c')
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 4691659e04a..346e2292af9 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -540,7 +540,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
/* allocation still failed; fall back
* to legacy mode */
- if (!buffer) {
+ if (!(buffer && (varray = glMapBufferARB(target, GL_WRITE_ONLY_ARB)))) {
use_VBOs = false;
success = true;
}