From 3e98331a094b0bc7f6bf8d386e610e06bfa4e61b Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Tue, 19 Apr 2022 11:15:22 -0300 Subject: PyGPU: remove outdated function 'code_from_builtin' Since shader sources are now parsed on demand via `GPUShaderCreateInfo`, sources are not available to be read via `GPU_shader_get_builtin_shader_code`. Currently this results in a crash as the code tries to read `NULL` pointers. `GPU_shader_get_builtin_shader_code` was created with the intention of informing the user how a builtin shader works, thus "replacing" detailed documentation. Therefore this function doesn't really have a practical use in an addon. So, instead of updating the function (which would require several changes to the gpu module), remove it and improve the documentation. Release Notes: https://wiki.blender.org/wiki/Reference/Release_Notes/3.2/Python_API#Breaking_Changes Reviewed By: fclem Differential Revision: https://developer.blender.org/D14678 --- source/blender/gpu/GPU_shader.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'source/blender/gpu/GPU_shader.h') diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h index eed7685bf01..0e7ce0889c2 100644 --- a/source/blender/gpu/GPU_shader.h +++ b/source/blender/gpu/GPU_shader.h @@ -371,12 +371,6 @@ GPUShader *GPU_shader_get_builtin_shader_with_config(eGPUBuiltinShader shader, eGPUShaderConfig sh_cfg); GPUShader *GPU_shader_get_builtin_shader(eGPUBuiltinShader shader); -void GPU_shader_get_builtin_shader_code(eGPUBuiltinShader shader, - const char **r_vert, - const char **r_frag, - const char **r_geom, - const char **r_defines); - void GPU_shader_free_builtin_shaders(void); /* Vertex attributes for shaders */ -- cgit v1.2.3