68 format,
"pos", blender::gpu::VertAttrType::SFLOAT_32_32_32);
70 format,
"nor", blender::gpu::VertAttrType::SFLOAT_32_32_32);
80 format,
"pos", blender::gpu::VertAttrType::SFLOAT_32_32);
82 format,
"color", blender::gpu::VertAttrType::SFLOAT_32_32_32_32);
134 const float lon_inc = 2 *
M_PI / lon_res;
135 const float lat_inc =
M_PI / lat_res;
139 const uint vbo_len = (lat_res - 1) * lon_res * 6;
147 for (
int i = 0;
i < lon_res;
i++, lon += lon_inc) {
149 for (
int j = 0; j < lat_res; j++, lat += lat_inc) {
150 if (j != lat_res - 1) {
172 const float lon_inc = 2 *
M_PI / lon_res;
173 const float lat_inc =
M_PI / lat_res;
177 const uint vbo_len = (lat_res * lon_res * 2) + ((lat_res - 1) * lon_res * 2);
185 for (
int i = 0;
i < lon_res;
i++, lon += lon_inc) {
187 for (
int j = 0; j < lat_res; j++, lat += lat_inc) {
191 if (j != lat_res - 1) {
210 float pos_data[4][2] = {{0.0f, 0.0f}, {0.0f, 1.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}};
266 blender::gpu::Batch *preset =
static_cast<blender::gpu::Batch *
>(link->data);
LinkData * BLI_genericNodeN(void *data)
void BLI_addtail(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
void GPU_batch_discard(blender::gpu::Batch *batch)
blender::gpu::Batch * GPU_batch_create_ex(GPUPrimType primitive_type, blender::gpu::VertBuf *vertex_buf, blender::gpu::IndexBuf *index_buf, GPUBatchFlag owns_flag)
void GPU_storagebuf_free(blender::gpu::StorageBuf *ssbo)
void GPU_vertbuf_attr_get_raw_data(blender::gpu::VertBuf *, uint a_idx, GPUVertBufRaw *access)
GPU_INLINE void * GPU_vertbuf_raw_step(GPUVertBufRaw *a)
void GPU_vertbuf_attr_fill(blender::gpu::VertBuf *, uint a_idx, const void *data)
static blender::gpu::VertBuf * GPU_vertbuf_create_with_format(const GPUVertFormat &format)
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
struct @021025263243242147216143265077100330027142264337::@225245033123204053237120173316075113304004012000 batch
static ListBase presets_list
blender::gpu::Batch * GPU_batch_preset_quad()
static GPUVertFormat & preset_3d_format()
static GPUVertFormat & preset_2d_format()
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
static ListBase buffer_list
void gpu_batch_storage_buffer_register(blender::gpu::StorageBuf *preset_buffer)
static blender::gpu::Batch * gpu_batch_sphere(int lat_res, int lon_res)
static struct @021025263243242147216143265077100330027142264337 g_presets_3d
static struct @041311352076166317212073256040344052312232023253 g_presets_2d
blender::gpu::Batch * quad
blender::gpu::Batch * sphere_low
struct @021025263243242147216143265077100330027142264337::@240232116316110053135047106323056371161236243121 attr_id
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)