70 format,
"pos", gpu::VertAttrType::SFLOAT_32_32_32);
72 format,
"nor", gpu::VertAttrType::SFLOAT_32_32_32);
82 format,
"pos", gpu::VertAttrType::SFLOAT_32_32);
84 format,
"color", gpu::VertAttrType::SFLOAT_32_32_32_32);
136 const float lon_inc = 2 *
M_PI / lon_res;
137 const float lat_inc =
M_PI / lat_res;
141 const uint vbo_len = (lat_res - 1) * lon_res * 6;
149 for (
int i = 0; i < lon_res; i++, lon += lon_inc) {
151 for (
int j = 0; j < lat_res; j++, lat += lat_inc) {
152 if (j != lat_res - 1) {
174 const float lon_inc = 2 *
M_PI / lon_res;
175 const float lat_inc =
M_PI / lat_res;
179 const uint vbo_len = (lat_res * lon_res * 2) + ((lat_res - 1) * lon_res * 2);
187 for (
int i = 0; i < lon_res; i++, lon += lon_inc) {
189 for (
int j = 0; j < lat_res; j++, lat += lat_inc) {
193 if (j != lat_res - 1) {
212 float pos_data[4][2] = {{0.0f, 0.0f}, {0.0f, 1.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}};
268 gpu::Batch *preset =
static_cast<gpu::Batch *
>(link->data);
Read Blender memory allocation and freeing.
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
GPU_INLINE uint GPU_vertbuf_raw_used(const GPUVertBufRaw *a)
static GPUVertFormat & preset_2d_format()
gpu::Batch * GPU_batch_create_ex(GPUPrimType primitive_type, gpu::VertBuf *vertex_buf, gpu::IndexBuf *index_buf, GPUBatchFlag owns_flag)
static struct blender::@254231171003143263230320320040336246336164304242 g_presets_2d
MINLINE void copy_v3_v3(float r[3], const float a[3])
void BLI_mutex_unlock(ThreadMutex *mutex)
void GPU_batch_discard(gpu::Batch *batch)
static ListBaseT< LinkData > presets_list
GPU_INLINE void * GPU_vertbuf_raw_step(GPUVertBufRaw *a)
void gpu_batch_storage_buffer_register(gpu::StorageBuf *preset_buffer)
static GPUVertFormat & preset_3d_format()
void * BLI_pophead(ListBase *listbase) ATTR_NONNULL(1)
gpu::Batch * gpu_batch_sphere(int lat_res, int lon_res) ATTR_WARN_UNUSED_RESULT
void BLI_mutex_lock(ThreadMutex *mutex)
void gpu_batch_presets_init()
LinkData * BLI_genericNodeN(void *data)
void gpu_batch_presets_register(gpu::Batch *preset_batch)
static struct blender::@227276277241050127303241112136216361116007216362 g_presets_3d
void GPU_vertbuf_attr_get_raw_data(gpu::VertBuf *, uint a_idx, GPUVertBufRaw *access)
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
void BLI_mutex_end(ThreadMutex *mutex)
static gpu::Batch * batch_sphere_wire(int lat_res, int lon_res)
gpu::Batch * GPU_batch_preset_quad()
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void GPU_vertbuf_attr_fill(gpu::VertBuf *, uint a_idx, const void *data)
void GPU_vertbuf_data_alloc(gpu::VertBuf &verts, uint v_len)
pthread_mutex_t ThreadMutex
void gpu_batch_presets_exit()
gpu::Batch * GPU_batch_preset_sphere(int lod) ATTR_WARN_UNUSED_RESULT
void GPU_storagebuf_free(gpu::StorageBuf *ssbo)
gpu::Batch * GPU_batch_preset_sphere_wire(int lod) ATTR_WARN_UNUSED_RESULT
static void batch_sphere_lat_lon_vert(GPUVertBufRaw *pos_step, GPUVertBufRaw *nor_step, float lat, float lon)
void BLI_mutex_init(ThreadMutex *mutex)
static ListBaseT< LinkData > buffer_list
struct blender::@254231171003143263230320320040336246336164304242::@330354346005035103023170064231341273375322222226 attr_id
struct blender::@254231171003143263230320320040336246336164304242::@236350330101024374063302317031045074307346333131 batch
gpu::Batch * sphere_wire_low
gpu::Batch * sphere_wire_med
struct blender::@227276277241050127303241112136216361116007216362::@311015206042074154152027234324206265260124165235 attr_id
struct blender::@227276277241050127303241112136216361116007216362::@133302374126343015340100247116332212135374332263 batch