svn merge -r40166:40279 ^/trunk/blender

This commit is contained in:
2011-09-17 04:59:14 +00:00
151 changed files with 1597 additions and 967 deletions

View File

@@ -240,7 +240,7 @@ GPUBuffer *GPU_buffer_alloc(int size)
size */
glGenBuffersARB(1, &buf->id);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf->id);
glBufferDataARB(GL_ARRAY_BUFFER_ARB, size, 0, GL_STATIC_DRAW_ARB);
glBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STATIC_DRAW_ARB);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
}
else {
@@ -493,7 +493,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
/* nothing to do for legacy mode */
if(dm->drawObject->legacy)
return 0;
return NULL;
cur_index_per_mat = MEM_mallocN(sizeof(int)*object->totmaterial,
"GPU_buffer_setup.cur_index_per_mat");
@@ -513,7 +513,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
/* bind the buffer and discard previous data,
avoids stalling gpu */
glBindBufferARB(target, buffer->id);
glBufferDataARB(target, buffer->size, 0, GL_STATIC_DRAW_ARB);
glBufferDataARB(target, buffer->size, NULL, GL_STATIC_DRAW_ARB);
/* attempt to map the buffer */
if(!(varray = glMapBufferARB(target, GL_WRITE_ONLY_ARB))) {

View File

@@ -514,8 +514,7 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels)
if (pixels)
MEM_freeN(pixels);
if (tex)
GPU_texture_unbind(tex);
GPU_texture_unbind(tex);
return tex;
}