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 @071105236270117237335366213026221352115023342037 g_presets_2d
static struct @242242037071113320047241043225005000171107066206 g_presets_3d
void MEM_freeN(void *vmemh)
blender::gpu::Batch * quad
struct @071105236270117237335366213026221352115023342037::@352030007324207205063312017244177115073060360144 attr_id
struct @071105236270117237335366213026221352115023342037::@015152204236004026311266270334327022073213105134 batch
blender::gpu::Batch * sphere_med
blender::gpu::Batch * sphere_wire_low
blender::gpu::Batch * sphere_low
blender::gpu::Batch * sphere_wire_med
blender::gpu::Batch * sphere_high
struct @242242037071113320047241043225005000171107066206::@206173266111205202207215222157223106072307262002 batch
struct @242242037071113320047241043225005000171107066206::@044012377252240315310114245334216020106067137216 attr_id