44 blender::gpu::Batch *
quad;
133 const float lon_inc = 2 *
M_PI / lon_res;
134 const float lat_inc =
M_PI / lat_res;
138 const uint vbo_len = (lat_res - 1) * lon_res * 6;
146 for (
int i = 0;
i < lon_res;
i++, lon += lon_inc) {
148 for (
int j = 0; j < lat_res; j++, lat += lat_inc) {
149 if (j != lat_res - 1) {
171 const float lon_inc = 2 *
M_PI / lon_res;
172 const float lat_inc =
M_PI / lat_res;
176 const uint vbo_len = (lat_res * lon_res * 2) + ((lat_res - 1) * lon_res * 2);
184 for (
int i = 0;
i < lon_res;
i++, lon += lon_inc) {
186 for (
int j = 0; j < lat_res; j++, lat += lat_inc) {
190 if (j != lat_res - 1) {
209 float pos_data[4][2] = {{0.0f, 0.0f}, {0.0f, 1.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}};
259 if (preset_batch == link->data) {
273 blender::gpu::Batch *preset =
static_cast<blender::gpu::Batch *
>(link->data);
LinkData * BLI_genericNodeN(void *data)
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_pophead(ListBase *listbase) ATTR_NONNULL(1)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void BLI_mutex_end(ThreadMutex *mutex)
void BLI_mutex_init(ThreadMutex *mutex)
int BLI_thread_is_main(void)
void BLI_mutex_lock(ThreadMutex *mutex)
void BLI_mutex_unlock(ThreadMutex *mutex)
pthread_mutex_t ThreadMutex
blender::gpu::Batch * GPU_batch_create_ex(GPUPrimType primitive_type, blender::gpu::VertBuf *vertex_buf, blender::gpu::IndexBuf *index_buf, eGPUBatchFlag owns_flag)
void GPU_batch_discard(blender::gpu::Batch *batch)
blender::gpu::Batch * GPU_batch_preset_quad()
bool gpu_batch_presets_unregister(blender::gpu::Batch *preset_batch)
void gpu_batch_presets_register(blender::gpu::Batch *preset_batch)
void gpu_batch_presets_init()
blender::gpu::Batch * GPU_batch_preset_sphere(int lod) ATTR_WARN_UNUSED_RESULT
blender::gpu::Batch * GPU_batch_preset_sphere_wire(int lod) ATTR_WARN_UNUSED_RESULT
void gpu_batch_presets_exit()
blender::gpu::Batch * gpu_batch_sphere(int lat_res, int lon_res) ATTR_WARN_UNUSED_RESULT
void GPU_vertbuf_attr_get_raw_data(blender::gpu::VertBuf *, uint a_idx, GPUVertBufRaw *access)
GPU_INLINE void * GPU_vertbuf_raw_step(GPUVertBufRaw *a)
#define GPU_vertbuf_create_with_format(format)
void GPU_vertbuf_attr_fill(blender::gpu::VertBuf *, uint a_idx, const void *data)
GPU_INLINE uint GPU_vertbuf_raw_used(const GPUVertBufRaw *a)
void GPU_vertbuf_data_alloc(blender::gpu::VertBuf &verts, uint v_len)
Read Guarded memory(de)allocation.
static blender::gpu::Batch * batch_sphere_wire(int lat_res, int lon_res)
static ListBase presets_list
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)
static struct @124326250076367123104123267062055113030022175233 g_presets_2d
static struct @316123006062111325250376100114154162162130160160 g_presets_3d
void MEM_freeN(void *vmemh)
blender::gpu::Batch * quad
struct @124326250076367123104123267062055113030022175233::@273144162305254123022110216143345127161326051137 batch
struct @124326250076367123104123267062055113030022175233::@011246163230262046156015141040102216043134161125 attr_id
blender::gpu::Batch * sphere_wire_med
blender::gpu::Batch * sphere_wire_low
blender::gpu::Batch * sphere_low
blender::gpu::Batch * sphere_med
blender::gpu::Batch * sphere_high
struct @316123006062111325250376100114154162162130160160::@006212242314245041100263151001142154005345332307 attr_id
struct @316123006062111325250376100114154162162130160160::@324024206141250053373012256316271275330050313272 batch