diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-18 04:43:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-18 04:44:08 +0300 |
commit | 75a4872c90fb809fdb1df9a6270df940dcf97c44 (patch) | |
tree | 524b2de81c419351afecbef65448d0b95637119f /source/blender/gpu | |
parent | 3e325c35f8701eb222a45326c04d54b24e5f23d3 (diff) |
Cleanup: declare original function storage variables static
Also minor comment formatting changes.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/opengl/gl_debug_layer.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/gpu/opengl/gl_debug_layer.cc b/source/blender/gpu/opengl/gl_debug_layer.cc index 188083b0f50..9c2b6c0e547 100644 --- a/source/blender/gpu/opengl/gl_debug_layer.cc +++ b/source/blender/gpu/opengl/gl_debug_layer.cc @@ -42,7 +42,7 @@ typedef void *GPUvoidptr; #define void_ret #define DEBUG_FUNC_DECLARE(pfn, rtn_type, fn, ...) \ - pfn real_##fn; \ + static pfn real_##fn; \ static rtn_type GLAPIENTRY debug_##fn(ARG_LIST(__VA_ARGS__)) \ { \ debug::check_gl_error("generated before " #fn); \ @@ -54,7 +54,7 @@ typedef void *GPUvoidptr; namespace blender::gpu::debug { /* List of wrapped functions. We dont have to support all of them. - * Some functions might be declared as extern in GLEW. We cannot override them in this case. + * Some functions might be declared as `extern` in GLEW. We cannot override them in this case. * Keep the list in alphabetical order. */ /* Avoid very long declarations. */ @@ -105,9 +105,11 @@ DEBUG_FUNC_DECLARE(PFNGLUSEPROGRAMPROC, void, glUseProgram, GLuint, program); #undef DEBUG_FUNC_DECLARE -/* Init a fallback layer (to KHR_debug) that covers only some functions. - * We override the functions pointers by our own implementation that just checks glGetError. - * Some additional functions (not overridable) are covered inside the header using wrappers. */ +/** + * Initialize a fallback layer (to KHR_debug) that covers only some functions. + * We override the functions pointers by our own implementation that just checks #glGetError. + * Some additional functions (not overridable) are covered inside the header using wrappers. + */ void init_debug_layer() { #define DEBUG_WRAP(function) \ |