Cleanup: Use doxy-groups for draw-cache

This commit is contained in:
Campbell Barton
2017-04-15 14:24:30 +10:00
parent 608b711beb
commit ff3942505a

View File

@@ -112,11 +112,16 @@ void DRW_shape_cache_free(void)
BATCH_DISCARD_ALL_SAFE(SHC.drw_camera_focus);
}
/* Helper functions */
static void add_fancy_edge(VertexBuffer *vbo, unsigned int pos_id, unsigned int n1_id, unsigned int n2_id,
unsigned int *v_idx, const float co1[3], const float co2[3],
const float n1[3], const float n2[3])
/* -------------------------------------------------------------------- */
/** \name Helper functions
* \{ */
static void add_fancy_edge(
VertexBuffer *vbo, unsigned int pos_id, unsigned int n1_id, unsigned int n2_id,
unsigned int *v_idx, const float co1[3], const float co2[3],
const float n1[3], const float n2[3])
{
VertexBuffer_set_attrib(vbo, n1_id, *v_idx, n1);
VertexBuffer_set_attrib(vbo, n2_id, *v_idx, n2);
@@ -127,8 +132,9 @@ static void add_fancy_edge(VertexBuffer *vbo, unsigned int pos_id, unsigned int
VertexBuffer_set_attrib(vbo, pos_id, (*v_idx)++, co2);
}
static void add_lat_lon_vert(VertexBuffer *vbo, unsigned int pos_id, unsigned int nor_id,
unsigned int *v_idx, const float rad, const float lat, const float lon)
static void add_lat_lon_vert(
VertexBuffer *vbo, unsigned int pos_id, unsigned int nor_id,
unsigned int *v_idx, const float rad, const float lat, const float lon)
{
float pos[3], nor[3];
nor[0] = sinf(lat) * cosf(lon);
@@ -259,7 +265,12 @@ Batch *DRW_cache_fullscreen_quad_get(void)
return SHC.drw_fullscreen_quad;
}
/* Common */
/** \} */
/* -------------------------------------------------------------------- */
/** \name Common
* \{ */
Batch *DRW_cache_cube_get(void)
{
@@ -436,7 +447,13 @@ Batch *DRW_cache_screenspace_circle_get(void)
#undef CIRCLE_RESOL
}
/* Empties */
/** \} */
/* -------------------------------------------------------------------- */
/** \name Empties
* \{ */
Batch *DRW_cache_plain_axes_get(void)
{
if (!SHC.drw_plain_axes) {
@@ -848,7 +865,13 @@ Batch *DRW_cache_field_cone_limit_get(void)
#undef CIRCLE_RESOL
}
/* Lamps */
/** \} */
/* -------------------------------------------------------------------- */
/** \name Lamps
* \{ */
Batch *DRW_cache_lamp_get(void)
{
#define NSEGMENTS 8
@@ -1114,7 +1137,13 @@ Batch *DRW_cache_lamp_spot_square_get(void)
return SHC.drw_lamp_spot_square;
}
/* Speaker */
/** \} */
/* -------------------------------------------------------------------- */
/** \name Speaker
* \{ */
Batch *DRW_cache_speaker_get(void)
{
if (!SHC.drw_speaker) {
@@ -1172,7 +1201,13 @@ Batch *DRW_cache_speaker_get(void)
return SHC.drw_speaker;
}
/* Armature bones */
/** \} */
/* -------------------------------------------------------------------- */
/** \name Armature Bones
* \{ */
static const float bone_octahedral_verts[6][3] = {
{ 0.0f, 0.0f, 0.0f},
{ 0.1f, 0.1f, 0.1f},
@@ -1342,7 +1377,13 @@ Batch *DRW_cache_bone_arrows_get(void)
return SHC.drw_bone_arrows;
}
/* Camera */
/** \} */
/* -------------------------------------------------------------------- */
/** \name Camera
* \{ */
Batch *DRW_cache_camera_get(void)
{
if (!SHC.drw_camera) {
@@ -1440,6 +1481,13 @@ Batch *DRW_cache_camera_tria_get(void)
return SHC.drw_camera_tria;
}
/** \} */
/* -------------------------------------------------------------------- */
/** \name Object Mode Helpers
* \{ */
/* Object Center */
Batch *DRW_cache_single_vert_get(void)
{
@@ -1463,7 +1511,13 @@ Batch *DRW_cache_single_vert_get(void)
return SHC.drw_single_vertice;
}
/* Meshes */
/** \} */
/* -------------------------------------------------------------------- */
/** \name Meshes
* \{ */
void DRW_cache_mesh_wire_overlay_get(
Object *ob,
Batch **r_tris, Batch **r_ledges, Batch **r_lverts)
@@ -1534,7 +1588,12 @@ Batch *DRW_cache_mesh_verts_get(Object *ob)
return surface;
}
/* Lattice */
/** \} */
/* -------------------------------------------------------------------- */
/** \name Lattice
* \{ */
Batch *DRW_cache_lattice_verts_get(Object *ob)
{
@@ -1572,6 +1631,9 @@ Batch *DRW_cache_lattice_vert_overlay_get(Object *ob)
return surface;
}
/** \} */
#if 0 /* TODO */
struct Batch *DRW_cache_surface_material_get(Object *ob, int nr) {
/* TODO */