diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 19:49:09 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 20:08:25 +0300 |
commit | 16732def37c5a66f3ea28dbe247b09cc6bca6677 (patch) | |
tree | 5d14f5c920a1411e336bd80b12becbb3f73de19a /source/blender/gpu/opengl/gl_vertex_buffer.cc | |
parent | 88926375a0e4e45f72c87b9e487c060ddd3c9216 (diff) |
Cleanup: Clang-Tidy modernize-use-nullptr
Replace `NULL` with `nullptr` in C++ code.
No functional changes.
Diffstat (limited to 'source/blender/gpu/opengl/gl_vertex_buffer.cc')
-rw-r--r-- | source/blender/gpu/opengl/gl_vertex_buffer.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/opengl/gl_vertex_buffer.cc b/source/blender/gpu/opengl/gl_vertex_buffer.cc index 74640162a0b..a56d5269fde 100644 --- a/source/blender/gpu/opengl/gl_vertex_buffer.cc +++ b/source/blender/gpu/opengl/gl_vertex_buffer.cc @@ -52,7 +52,7 @@ void GLVertBuf::release_data() void GLVertBuf::duplicate_data(VertBuf *dst_) { - BLI_assert(GLContext::get() != NULL); + BLI_assert(GLContext::get() != nullptr); GLVertBuf *src = this; GLVertBuf *dst = static_cast<GLVertBuf *>(dst_); @@ -61,7 +61,7 @@ void GLVertBuf::duplicate_data(VertBuf *dst_) glGenBuffers(1, &dst->vbo_id_); glBindBuffer(GL_COPY_WRITE_BUFFER, dst->vbo_id_); - glBufferData(GL_COPY_WRITE_BUFFER, dst->vbo_size_, NULL, to_gl(dst->usage_)); + glBufferData(GL_COPY_WRITE_BUFFER, dst->vbo_size_, nullptr, to_gl(dst->usage_)); glBindBuffer(GL_COPY_READ_BUFFER, src->vbo_id_); @@ -82,7 +82,7 @@ void GLVertBuf::upload_data() void GLVertBuf::bind() { - BLI_assert(GLContext::get() != NULL); + BLI_assert(GLContext::get() != nullptr); if (vbo_id_ == 0) { glGenBuffers(1, &vbo_id_); @@ -93,7 +93,7 @@ void GLVertBuf::bind() if (flag & GPU_VERTBUF_DATA_DIRTY) { vbo_size_ = this->size_used_get(); /* Orphan the vbo to avoid sync then upload data. */ - glBufferData(GL_ARRAY_BUFFER, vbo_size_, NULL, to_gl(usage_)); + glBufferData(GL_ARRAY_BUFFER, vbo_size_, nullptr, to_gl(usage_)); glBufferSubData(GL_ARRAY_BUFFER, 0, vbo_size_, data); memory_usage += vbo_size_; |