|
Blender V4.3
|
Go to the source code of this file.
Macros | |
| #define | GPU_SHADER_BUILTIN_LEN (GPU_SHADER_3D_IMAGE_COLOR + 1) |
| #define | GPU_SHADER_CFG_LEN (GPU_SHADER_CFG_CLIPPED + 1) |
Functions | |
| GPUShader * | GPU_shader_get_builtin_shader_with_config (eGPUBuiltinShader shader, eGPUShaderConfig sh_cfg) |
| GPUShader * | GPU_shader_get_builtin_shader (eGPUBuiltinShader shader) |
| void | GPU_shader_free_builtin_shaders () |
Set of shaders used for interface drawing.
2D shaders are not expected to work in 3D. 3D shaders can work with 2D geometry and matrices.
INST suffix means instance, which means the shader is build to leverage instancing capabilities to reduce the number of draw-calls.
For full list of parameters, search for the associated #ShaderCreateInfo. Example: GPU_SHADER_ICON is defined by GPU_SHADER_CREATE_INFO(gpu_shader_icon) Some parameters are builtins and are set automatically (ex: ModelViewProjectionMatrix).
Definition in file GPU_shader_builtin.hh.
| #define GPU_SHADER_BUILTIN_LEN (GPU_SHADER_3D_IMAGE_COLOR + 1) |
Definition at line 137 of file GPU_shader_builtin.hh.
Referenced by GPU_shader_free_builtin_shaders(), and GPU_shader_get_builtin_shader_with_config().
| #define GPU_SHADER_CFG_LEN (GPU_SHADER_CFG_CLIPPED + 1) |
Definition at line 144 of file GPU_shader_builtin.hh.
Referenced by BASIC_shaders_free(), GPU_shader_free_builtin_shaders(), and GPU_shader_get_builtin_shader_with_config().
| enum eGPUBuiltinShader |
Definition at line 25 of file GPU_shader_builtin.hh.
| enum eGPUShaderConfig |
Support multiple configurations.
| Enumerator | |
|---|---|
| GPU_SHADER_CFG_DEFAULT | |
| GPU_SHADER_CFG_CLIPPED | |
Definition at line 140 of file GPU_shader_builtin.hh.
| void GPU_shader_free_builtin_shaders | ( | ) |
Definition at line 175 of file gpu_shader_builtin.cc.
References builtin_shaders, GPU_SHADER_BUILTIN_LEN, GPU_SHADER_CFG_LEN, and GPU_shader_free().
Referenced by gpu_codegen_exit().
| GPUShader * GPU_shader_get_builtin_shader | ( | eGPUBuiltinShader | shader | ) |
Definition at line 170 of file gpu_shader_builtin.cc.
References GPU_SHADER_CFG_DEFAULT, and GPU_shader_get_builtin_shader_with_config().
Referenced by DRW_draw_cursor(), DRW_draw_cursor_2d_ex(), GPU_indexbuf_build_curves_on_device(), immBindBuiltinProgram(), immDrawPixelsTexSetup(), blender::render::hydra::ViewportEngine::render(), blender::ed::seq::StripsDrawBatch::StripsDrawBatch(), blender::draw::test_draw_pass_all_commands(), blender::draw::test_draw_pass_multi_draw(), blender::draw::test_draw_pass_simple_draw(), blender::draw::test_draw_pass_sub_ordering(), blender::draw::test_draw_resource_id_gen(), blender::draw::test_draw_visibility(), ThumbsDrawBatch::ThumbsDrawBatch(), and wm_draw_region_blend().
| GPUShader * GPU_shader_get_builtin_shader_with_config | ( | eGPUBuiltinShader | shader, |
| eGPUShaderConfig | sh_cfg ) |
Definition at line 127 of file gpu_shader_builtin.cc.
References BLI_assert, builtin_shader_create_info_name(), builtin_shader_create_info_name_clipped(), builtin_shaders, ELEM, GPU_SHADER_3D_POLYLINE_CLIPPED_UNIFORM_COLOR, GPU_SHADER_3D_POLYLINE_FLAT_COLOR, GPU_SHADER_3D_POLYLINE_SMOOTH_COLOR, GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR, GPU_shader_bind(), GPU_SHADER_BUILTIN_LEN, GPU_SHADER_CFG_CLIPPED, GPU_SHADER_CFG_DEFAULT, GPU_SHADER_CFG_LEN, GPU_shader_create_from_info_name(), and GPU_shader_uniform_1i().
Referenced by GPU_batch_program_set_builtin_with_config(), GPU_shader_get_builtin_shader(), and pygpu_shader_from_builtin().