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-11-22 21:46:31 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-11-22 21:47:54 +0300
commitc402a379a23af71aa5c21566967b75ab5c869e01 (patch)
treef7bf5b05bdcbf191bd0bfca1c0f89a1a441770d1 /source/blender/blenkernel/intern/cdderivedmesh.c
parent3e1a9ee386b054912b540b7a061d76235f4049fa (diff)
Remove vertex array support from GPUBuffers. Remove USER_DISABLE_VBO. All
GPUBuffer rendering is now done using vertex buffers. Vertex arrays are completely removed from GL 3.2 core profile, so we'll have to do this change at some point anyway. This commit, though big, is not modifying blender in any way. Use should be exactly as if the vetex buffer option is constantly on.
Diffstat (limited to 'source/blender/blenkernel/intern/cdderivedmesh.c')
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index be4f0011e97..b925094d392 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -665,7 +665,7 @@ static void cdDM_drawMappedFaces(
else
me = userData;
- findex_buffer = GPU_buffer_alloc(dm->drawObject->tot_loop_verts * sizeof(int), false);
+ findex_buffer = GPU_buffer_alloc(dm->drawObject->tot_loop_verts * sizeof(int));
fi_map = GPU_buffer_lock(findex_buffer, GPU_BINDING_ARRAY);
if (fi_map) {
@@ -898,9 +898,7 @@ static void cdDM_drawMappedFacesGLSL(
glShadeModel(GL_SMOOTH);
- /* workaround for NVIDIA GPUs on Mac not supporting vertex arrays + interleaved formats, see T43342 */
- if ((GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_MAC, GPU_DRIVER_ANY) && (U.gameflags & USER_DISABLE_VBO)) ||
- setDrawOptions != NULL)
+ if (setDrawOptions != NULL)
{
DMVertexAttribs attribs;
DEBUG_VBO("Using legacy code. cdDM_drawMappedFacesGLSL\n");
@@ -1037,11 +1035,8 @@ static void cdDM_drawMappedFacesGLSL(
/* part two, generate and fill the arrays with the data */
if (max_element_size > 0) {
- buffer = GPU_buffer_alloc(max_element_size * dm->drawObject->tot_loop_verts, false);
+ buffer = GPU_buffer_alloc(max_element_size * dm->drawObject->tot_loop_verts);
- if (buffer == NULL) {
- buffer = GPU_buffer_alloc(max_element_size * dm->drawObject->tot_loop_verts, true);
- }
varray = GPU_buffer_lock_stream(buffer, GPU_BINDING_ARRAY);
if (varray == NULL) {
GPU_buffers_unbind();