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)
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)
blender::gpu::Batch * sphere_high
static ListBase presets_list
static struct @242053044010324116347033273112253060004051364061 g_presets_3d
blender::gpu::Batch * GPU_batch_preset_quad()
static GPUVertFormat & preset_3d_format()
static GPUVertFormat & preset_2d_format()
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()
static void batch_sphere_lat_lon_vert(GPUVertBufRaw *pos_step, GPUVertBufRaw *nor_step, float lat, float lon)
blender::gpu::Batch * sphere_wire_low
struct @242053044010324116347033273112253060004051364061::@373043131300025057314200265134167265161140142363 attr_id
static blender::gpu::Batch * gpu_batch_sphere(int lat_res, int lon_res)
static struct @203247140033252231240122031014114356133050345041 g_presets_2d
blender::gpu::Batch * quad
blender::gpu::Batch * sphere_low
struct @242053044010324116347033273112253060004051364061::@051143074301336237271216303350234260141112266062 batch
blender::gpu::Batch * sphere_wire_med
blender::gpu::Batch * GPU_batch_preset_sphere_wire(int lod)
blender::gpu::Batch * GPU_batch_preset_sphere(int lod)
void gpu_batch_presets_exit()
blender::gpu::Batch * sphere_med
void MEM_freeN(void *vmemh)