|
Blender V4.5
|
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 146 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 153 of file GPU_shader_builtin.hh.
Referenced by 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 149 of file GPU_shader_builtin.hh.
| void GPU_shader_free_builtin_shaders | ( | ) |
Definition at line 191 of file gpu_shader_builtin.cc.
References builtin_shaders, GPU_SHADER_BUILTIN_LEN, GPU_SHADER_CFG_LEN, GPU_shader_free(), and GPU_shader_unbind().
Referenced by GPU_exit().
| GPUShader * GPU_shader_get_builtin_shader | ( | eGPUBuiltinShader | shader | ) |
Definition at line 186 of file gpu_shader_builtin.cc.
References GPU_SHADER_CFG_DEFAULT, and GPU_shader_get_builtin_shader_with_config().
Referenced by blender::draw::overlay::Cursor::begin_sync(), bpygpu_shader_is_polyline(), GPU_indexbuf_build_curves_on_device(), immBindBuiltinProgram(), immDrawPixelsTexSetup(), pygpu_batch_draw(), blender::render::hydra::ViewportEngine::render(), blender::ed::vse::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_submit_only(), blender::draw::test_draw_visibility(), blender::ed::vse::ThumbsDrawBatch::ThumbsDrawBatch(), and wm_draw_region_blend().
| GPUShader * GPU_shader_get_builtin_shader_with_config | ( | eGPUBuiltinShader | shader, |
| eGPUShaderConfig | sh_cfg ) |
Definition at line 138 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(), GPU_shader_uniform_1i(), and blender::gpu::unwrap().
Referenced by GPU_batch_program_set_builtin_with_config(), GPU_shader_get_builtin_shader(), and pygpu_shader_from_builtin().