|
Blender V4.5
|
#include "BLI_listbase.h"#include "BLI_math_vector.h"#include "BLI_math_vector_types.hh"#include "BLI_threads.h"#include "MEM_guardedalloc.h"#include "GPU_batch.hh"#include "GPU_batch_presets.hh"Go to the source code of this file.
Classes | |
| struct | [struct].g_presets_3d |
| struct | [struct].g_presets_2d |
Functions | |
3D Primitives | |
| static GPUVertFormat & | preset_3d_format () |
| static GPUVertFormat & | preset_2d_format () |
| static void | batch_sphere_lat_lon_vert (GPUVertBufRaw *pos_step, GPUVertBufRaw *nor_step, float lat, float lon) |
| blender::gpu::Batch * | GPU_batch_preset_sphere (int lod) |
| blender::gpu::Batch * | GPU_batch_preset_sphere_wire (int lod) |
Create Sphere (3D) | |
| static blender::gpu::Batch * | gpu_batch_sphere (int lat_res, int lon_res) |
| static blender::gpu::Batch * | batch_sphere_wire (int lat_res, int lon_res) |
| blender::gpu::Batch * | GPU_batch_preset_quad () |
Preset Registration Management | |
| void | gpu_batch_presets_init () |
| void | gpu_batch_presets_register (blender::gpu::Batch *preset_batch) |
| bool | gpu_batch_presets_unregister (blender::gpu::Batch *preset_batch) |
| void | gpu_batch_presets_exit () |
Variables | |
Local Structures | |
| static struct | g_presets_3d = {{nullptr}} |
| static struct | g_presets_2d = {{nullptr}} |
| static ListBase | presets_list = {nullptr, nullptr} |
|
static |
Definition at line 86 of file gpu_batch_presets.cc.
References batch_sphere_lat_lon_vert(), copy_v3_v3(), cosf, GPU_vertbuf_raw_step(), and sinf.
Referenced by batch_sphere_lat_lon_vert(), batch_sphere_wire(), and gpu_batch_sphere().
|
static |
Definition at line 169 of file gpu_batch_presets.cc.
References batch_sphere_lat_lon_vert(), batch_sphere_wire(), BLI_assert, g_presets_3d, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_raw_used(), i, M_PI, and preset_3d_format().
Referenced by batch_sphere_wire(), and gpu_batch_presets_init().
| blender::gpu::Batch * GPU_batch_preset_quad | ( | ) |
To be used with procedural placement inside shader.
Definition at line 203 of file gpu_batch_presets.cc.
References g_presets_2d, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_batch_preset_quad(), gpu_batch_presets_register(), GPU_PRIM_TRI_STRIP, GPU_vertbuf_attr_fill(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), and preset_2d_format().
Referenced by blender::gpu::tests::blend_test(), GPU_batch_preset_quad(), blender::ed::vse::StripsDrawBatch::StripsDrawBatch(), blender::ed::vse::ThumbsDrawBatch::ThumbsDrawBatch(), and wm_draw_region_blend().
| blender::gpu::Batch * GPU_batch_preset_sphere | ( | int | lod | ) |
Definition at line 98 of file gpu_batch_presets.cc.
References BLI_assert, BLI_thread_is_main(), g_presets_3d, and GPU_batch_preset_sphere().
Referenced by blender::ed::curves::curve_draw_stroke_3d(), curve_draw_stroke_3d(), GPU_batch_preset_sphere(), ui_draw_but_UNITVEC(), and wm_xr_controller_model_draw().
| blender::gpu::Batch * GPU_batch_preset_sphere_wire | ( | int | lod | ) |
Definition at line 113 of file gpu_batch_presets.cc.
References BLI_assert, BLI_thread_is_main(), g_presets_3d, and GPU_batch_preset_sphere_wire().
Referenced by GPU_batch_preset_sphere_wire().
| void gpu_batch_presets_exit | ( | ) |
Definition at line 270 of file gpu_batch_presets.cc.
References BLI_mutex_end(), BLI_pophead(), g_presets_2d, g_presets_3d, GPU_batch_discard(), gpu_batch_presets_exit(), MEM_freeN(), and presets_list.
Referenced by gpu_batch_exit(), and gpu_batch_presets_exit().
| void gpu_batch_presets_init | ( | ) |
Definition at line 227 of file gpu_batch_presets.cc.
References batch_sphere_wire(), BLI_mutex_init(), g_presets_3d, gpu_batch_presets_init(), gpu_batch_presets_register(), and gpu_batch_sphere().
Referenced by gpu_batch_init(), and gpu_batch_presets_init().
| void gpu_batch_presets_register | ( | blender::gpu::Batch * | preset_batch | ) |
Definition at line 248 of file gpu_batch_presets.cc.
References BLI_addtail(), BLI_genericNodeN(), BLI_mutex_lock(), BLI_mutex_unlock(), g_presets_3d, gpu_batch_presets_register(), and presets_list.
Referenced by batch_screen_edges_get(), GPU_batch_preset_quad(), gpu_batch_presets_init(), gpu_batch_presets_register(), blender::ed::space_node::nodelink_batch_init(), blender::ed::space_node::nodesocket_batch_init(), ui_batch_roundbox_shadow_get(), and ui_batch_roundbox_widget_get().
| bool gpu_batch_presets_unregister | ( | blender::gpu::Batch * | preset_batch | ) |
Definition at line 255 of file gpu_batch_presets.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), BLI_remlink(), g_presets_3d, gpu_batch_presets_unregister(), LISTBASE_FOREACH_BACKWARD, MEM_freeN(), and presets_list.
Referenced by gpu_batch_presets_unregister().
|
static |
Definition at line 131 of file gpu_batch_presets.cc.
References batch_sphere_lat_lon_vert(), BLI_assert, g_presets_3d, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, gpu_batch_sphere(), GPU_PRIM_TRIS, GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_raw_used(), i, M_PI, and preset_3d_format().
|
static |
Definition at line 74 of file gpu_batch_presets.cc.
References g_presets_2d, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_vertformat_attr_add(), and preset_2d_format().
Referenced by GPU_batch_preset_quad(), and preset_2d_format().
|
static |
Definition at line 62 of file gpu_batch_presets.cc.
References g_presets_3d, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_vertformat_attr_add(), and preset_3d_format().
Referenced by batch_sphere_wire(), gpu_batch_sphere(), and preset_3d_format().
| struct [struct].g_presets_2d g_presets_2d |
Referenced by GPU_batch_preset_quad(), gpu_batch_presets_exit(), and preset_2d_format().
| struct [struct].g_presets_3d g_presets_3d |
Definition at line 54 of file gpu_batch_presets.cc.
Referenced by gpu_batch_presets_exit(), gpu_batch_presets_register(), and gpu_batch_presets_unregister().