Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-06-19 13:18:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-19 13:18:04 +0300
commitb4d053efc75424fca4b413ac1bc7a7e826fac629 (patch)
tree80647d9ca9109e997fce9911f202f98d7f8577d4 /source/blender/blenkernel
parent349946bd010b1112b13c8594aabfb318c330bc0d (diff)
Gawain API naming refactor
Use consistent prefix for gawain API names as well as some abbreviations to avoid over-long names, see: D2678
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_animsys.h2
-rw-r--r--source/blender/blenkernel/BKE_pbvh.h4
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c8
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c14
-rw-r--r--source/blender/blenkernel/intern/cloth.c4
-rw-r--r--source/blender/blenkernel/intern/pbvh.c8
6 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h
index 420ae4bb12d..3e6e24a28b0 100644
--- a/source/blender/blenkernel/BKE_animsys.h
+++ b/source/blender/blenkernel/BKE_animsys.h
@@ -147,7 +147,7 @@ char *BKE_animdata_driver_path_hack(struct bContext *C, struct PointerRNA *ptr,
char *base_path);
/* ************************************* */
-/* Batch AnimData API */
+/* Gwn_Batch AnimData API */
/* Define for callback looper used in BKE_animdata_main_cb */
typedef void (*ID_AnimData_Edit_Callback)(struct ID *id, struct AnimData *adt, void *user_data);
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h
index 27c6814b959..905eb677612 100644
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@ -30,7 +30,7 @@
#include "BLI_ghash.h"
#include "BLI_utildefines.h"
-struct Batch;
+struct Gwn_Batch;
struct CCGElem;
struct CCGKey;
struct CustomData;
@@ -121,7 +121,7 @@ void BKE_pbvh_draw(PBVH *bvh, float (*planes)[4], float (*face_nors)[3],
int (*setMaterial)(int matnr, void *attribs), bool wireframe, bool fast);
void BKE_pbvh_draw_cb(
PBVH *bvh, float (*planes)[4], float (*fnors)[3], bool fast,
- void (*draw_fn)(void *user_data, struct Batch *batch), void *user_data);
+ void (*draw_fn)(void *user_data, struct Gwn_Batch *batch), void *user_data);
/* PBVH Access */
typedef enum {
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 874637896cd..55d5f6f89a1 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -3520,14 +3520,14 @@ static void navmesh_drawColored(DerivedMesh *dm)
dm->drawEdges(dm, 0, 1);
#endif
- VertexFormat *format = immVertexFormat();
- unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 3, KEEP_FLOAT);
- unsigned int color = VertexFormat_add_attrib(format, "color", COMP_F32, 3, KEEP_FLOAT);
+ Gwn_VertFormat *format = immVertexFormat();
+ unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
+ unsigned int color = GWN_vertformat_attr_add(format, "color", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_3D_FLAT_COLOR);
/* Note: batch drawing API would let us share vertices */
- immBeginAtMost(PRIM_TRIANGLES, dm->numTessFaceData * 6);
+ immBeginAtMost(GWN_PRIM_TRIS, dm->numTessFaceData * 6);
for (int a = 0; a < dm->numTessFaceData; a++, mface++) {
int pi = polygonIdx[a];
if (pi <= 0) {
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index c743d1f7e11..155634c9d9c 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -388,8 +388,8 @@ static void cdDM_drawEdges(DerivedMesh *dm, bool UNUSED(drawLooseEdges), bool UN
MVert *vert = cddm->mvert;
MEdge *edge = cddm->medge;
- VertexFormat *format = immVertexFormat();
- unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 3, KEEP_FLOAT);
+ Gwn_VertFormat *format = immVertexFormat();
+ unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
/* NOTE: This is active object color, which is not really perfect.
* But we can't query color set by glColor() :(
@@ -406,7 +406,7 @@ static void cdDM_drawEdges(DerivedMesh *dm, bool UNUSED(drawLooseEdges), bool UN
const int num_current_edges = (chunk < num_chunks - 1)
? chunk_size
: dm->numEdgeData - chunk_size * (num_chunks - 1);
- immBeginAtMost(PRIM_LINES, num_current_edges * 2);
+ immBeginAtMost(GWN_PRIM_LINES, num_current_edges * 2);
for (int i = 0; i < num_current_edges; i++, edge++) {
immVertex3fv(pos, vert[edge->v1].co);
immVertex3fv(pos, vert[edge->v2].co);
@@ -461,9 +461,9 @@ static void cdDM_drawFacesSolid(
const float (*nors)[3] = dm->getPolyDataArray(dm, CD_NORMAL);
const float (*lnors)[3] = dm->getLoopDataArray(dm, CD_NORMAL);
- VertexFormat *format = immVertexFormat();
- unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 3, KEEP_FLOAT);
- unsigned int nor = VertexFormat_add_attrib(format, "nor", COMP_F32, 3, KEEP_FLOAT);
+ Gwn_VertFormat *format = immVertexFormat();
+ unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
+ unsigned int nor = GWN_vertformat_attr_add(format, "nor", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
float color[4] = {0.8f, 0.8f, 0.8f, 1.0f};
const float light_vec[3] = {0.0f, 0.0f, 1.0f};
@@ -480,7 +480,7 @@ static void cdDM_drawFacesSolid(
? chunk_size
: num_looptris - chunk_size * (num_chunks - 1);
- immBeginAtMost(PRIM_TRIANGLES, num_current_looptris * 3);
+ immBeginAtMost(GWN_PRIM_TRIS, num_current_looptris * 3);
for (a = 0; a < num_current_looptris; a++, looptri++) {
const MPoly *mp = &mpoly[looptri->poly];
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 8190a7c2a8b..6d0ad3255a2 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -922,7 +922,7 @@ static void cloth_from_mesh ( ClothModifierData *clmd, DerivedMesh *dm )
}
/***************************************************************************************
- * SPRING NETWORK BUILDING IMPLEMENTATION BEGIN
+ * SPRING NETWORK GWN_BATCH_BUILDING IMPLEMENTATION BEGIN
***************************************************************************************/
BLI_INLINE void spring_verts_ordered_set(ClothSpring *spring, int v0, int v1)
@@ -1504,6 +1504,6 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
} /* cloth_build_springs */
/***************************************************************************************
- * SPRING NETWORK BUILDING IMPLEMENTATION END
+ * SPRING NETWORK GWN_BATCH_BUILDING IMPLEMENTATION END
***************************************************************************************/
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 336d4fae1b8..ef2eaf8405b 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -1159,7 +1159,7 @@ static void pbvh_update_draw_buffers(PBVH *bvh, PBVHNode **nodes, int totnode)
static void pbvh_draw_BB(PBVH *bvh)
{
- unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 3, KEEP_FLOAT);
+ unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
for (int a = 0; a < bvh->totnode; a++) {
@@ -1849,7 +1849,7 @@ void BKE_pbvh_draw(PBVH *bvh, float (*planes)[4], float (*fnors)[3],
struct PBVHNodeDrawCallbackData {
- void (*draw_fn)(void *user_data, Batch *batch);
+ void (*draw_fn)(void *user_data, Gwn_Batch *batch);
void *user_data;
bool fast;
};
@@ -1859,7 +1859,7 @@ static void pbvh_node_draw_cb(PBVHNode *node, void *data_v)
struct PBVHNodeDrawCallbackData *data = data_v;
if (!(node->flag & PBVH_FullyHidden)) {
- Batch *triangles = GPU_pbvh_buffers_batch_get(node->draw_buffers, data->fast);
+ Gwn_Batch *triangles = GPU_pbvh_buffers_batch_get(node->draw_buffers, data->fast);
if (triangles != NULL) {
data->draw_fn(data->user_data, triangles);
}
@@ -1871,7 +1871,7 @@ static void pbvh_node_draw_cb(PBVHNode *node, void *data_v)
*/
void BKE_pbvh_draw_cb(
PBVH *bvh, float (*planes)[4], float (*fnors)[3], bool fast,
- void (*draw_fn)(void *user_data, Batch *batch), void *user_data)
+ void (*draw_fn)(void *user_data, Gwn_Batch *batch), void *user_data)
{
struct PBVHNodeDrawCallbackData draw_data = {
.fast = fast,