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.
This commit is contained in:
Antony Riakiotakis
2015-07-21 16:40:58 +02:00
parent 89e5c75666
commit 1df42798d4

View File

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