diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-24 08:56:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-24 08:59:34 +0300 |
commit | 4b9ff3cd42be427e478743648e9951bf8c189a04 (patch) | |
tree | b0cb1462a8fdae38df4a0a1067349f3118d56a43 /source/blender/gpu | |
parent | 2e99a74df9ecfa18c4081cdcc82227e2e24f14b1 (diff) |
Cleanup: comment blocks, trailing space in comments
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_index_buffer_private.hh | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_select_pick.c | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_vertex_buffer.cc | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_vertex_format.cc | 9 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_framebuffer.cc | 2 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_immediate.cc | 2 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_texture.cc | 4 |
7 files changed, 12 insertions, 11 deletions
diff --git a/source/blender/gpu/intern/gpu_index_buffer_private.hh b/source/blender/gpu/intern/gpu_index_buffer_private.hh index e8a47417604..ed7dd830c8c 100644 --- a/source/blender/gpu/intern/gpu_index_buffer_private.hh +++ b/source/blender/gpu/intern/gpu_index_buffer_private.hh @@ -51,7 +51,7 @@ class IndexBuf { protected: /** Type of indices used inside this buffer. */ GPUIndexBufType index_type_ = GPU_INDEX_U32; - /** Offset in this buffer to the first index to render. Is 0 if not a subrange. */ + /** Offset in this buffer to the first index to render. Is 0 if not a subrange. */ uint32_t index_start_ = 0; /** Number of indices to render. */ uint32_t index_len_ = 0; diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c index 89c94fd3ba5..3f9da50a2eb 100644 --- a/source/blender/gpu/intern/gpu_select_pick.c +++ b/source/blender/gpu/intern/gpu_select_pick.c @@ -484,7 +484,7 @@ bool gpu_select_pick_load_id(uint id, bool end) GPUFrameBuffer *fb = GPU_framebuffer_active_get(); GPU_framebuffer_read_depth( fb, UNPACK4(ps->gl.clip_readpixels), GPU_DATA_UINT, ps->gl.rect_depth_test->buf); - /* perform initial check since most cases the array remains unchanged */ + /* Perform initial check since most cases the array remains unchanged. */ bool do_pass = false; if (g_pick_state.mode == GPU_SELECT_PICK_ALL) { diff --git a/source/blender/gpu/intern/gpu_vertex_buffer.cc b/source/blender/gpu/intern/gpu_vertex_buffer.cc index 3ecbb740a0c..2c21d2bf9af 100644 --- a/source/blender/gpu/intern/gpu_vertex_buffer.cc +++ b/source/blender/gpu/intern/gpu_vertex_buffer.cc @@ -229,7 +229,7 @@ void GPU_vertbuf_attr_fill(GPUVertBuf *verts_, uint a_idx, const void *data) GPU_vertbuf_attr_fill_stride(verts_, a_idx, stride, data); } -/** Fills a whole vertex (all attributes). Data must match packed layout. */ +/** Fills a whole vertex (all attributes). Data must match packed layout. */ void GPU_vertbuf_vert_set(GPUVertBuf *verts_, uint v_idx, const void *data) { VertBuf *verts = unwrap(verts_); diff --git a/source/blender/gpu/intern/gpu_vertex_format.cc b/source/blender/gpu/intern/gpu_vertex_format.cc index 8498da11507..d36a6761cfc 100644 --- a/source/blender/gpu/intern/gpu_vertex_format.cc +++ b/source/blender/gpu/intern/gpu_vertex_format.cc @@ -306,7 +306,8 @@ void GPU_vertformat_safe_attr_name(const char *attr_name, char *r_safe_name, uin #endif } -/* Make attribute layout non-interleaved. +/** + * Make attribute layout non-interleaved. * Warning! This does not change data layout! * Use direct buffer access to fill the data. * This is for advanced usage. @@ -314,11 +315,11 @@ void GPU_vertformat_safe_attr_name(const char *attr_name, char *r_safe_name, uin * De-interleaved data means all attribute data for each attribute * is stored continuously like this: * 000011112222 - * instead of : + * instead of: * 012012012012 * - * Note this is per attribute de-interleaving, NOT per component. - * */ + * \note This is per attribute de-interleaving, NOT per component. + */ void GPU_vertformat_deinterleave(GPUVertFormat *format) { /* Ideally we should change the stride and offset here. This would allow diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc index 920dac407d7..e87b22985bd 100644 --- a/source/blender/gpu/opengl/gl_framebuffer.cc +++ b/source/blender/gpu/opengl/gl_framebuffer.cc @@ -86,7 +86,7 @@ GLFrameBuffer::~GLFrameBuffer() /* Restore default frame-buffer if this frame-buffer was bound. */ if (context_->active_fb == this && context_->back_left != this) { /* If this assert triggers it means the frame-buffer is being freed while in use by another - * context which, by the way, is TOTALLY UNSAFE!!! */ + * context which, by the way, is TOTALLY UNSAFE! */ BLI_assert(context_ == Context::get()); GPU_framebuffer_restore(); } diff --git a/source/blender/gpu/opengl/gl_immediate.cc b/source/blender/gpu/opengl/gl_immediate.cc index 63e3162944d..2f7fa5a78fc 100644 --- a/source/blender/gpu/opengl/gl_immediate.cc +++ b/source/blender/gpu/opengl/gl_immediate.cc @@ -155,7 +155,7 @@ void GLImmediate::end() GLContext::get()->state_manager->apply_state(); /* We convert the offset in vertex offset from the buffer's start. - * This works because we added some padding to align the first vertex vertex. */ + * This works because we added some padding to align the first vertex vertex. */ uint v_first = buffer_offset() / vertex_format.stride; GLVertArray::update_bindings( vao_id_, v_first, &vertex_format, reinterpret_cast<Shader *>(shader)->interface); diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc index e2478a9976c..ddc45a6a904 100644 --- a/source/blender/gpu/opengl/gl_texture.cc +++ b/source/blender/gpu/opengl/gl_texture.cc @@ -79,7 +79,7 @@ bool GLTexture::init_internal() target_ = to_gl_target(type_); - /* We need to bind once to define the texture type. */ + /* We need to bind once to define the texture type. */ GLContext::state_manager_active_get()->texture_bind_temp(this); if (!this->proxy_check(0)) { @@ -106,7 +106,7 @@ bool GLTexture::init_internal(GPUVertBuf *vbo) GLVertBuf *gl_vbo = static_cast<GLVertBuf *>(unwrap(vbo)); target_ = to_gl_target(type_); - /* We need to bind once to define the texture type. */ + /* We need to bind once to define the texture type. */ GLContext::state_manager_active_get()->texture_bind_temp(this); GLenum internal_format = to_gl_internal_format(format_); |