diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-16 12:20:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-16 12:20:21 +0400 |
commit | 2222f536f81210b557f62a5ea037aa9fa7f4e98b (patch) | |
tree | 3a8b96e2b8cb1cf93fa8422e98e0c577649f8674 /source/blender/gpu | |
parent | 0849eaebbfe6cf08a2a7f52ff79cc3e9cc4f0657 (diff) |
use replace 0 with NULL for pointers, set some functions static
also fixed own errors in recent static check commit.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 4d4561e66db..ce3a378ea00 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -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))) { |