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:
authorJason Wilkins <Jason.A.Wilkins@gmail.com>2012-05-04 15:50:11 +0400
committerJason Wilkins <Jason.A.Wilkins@gmail.com>2012-05-04 15:50:11 +0400
commita0ce240de94521b6caf55b0738b70f2dc2ad3353 (patch)
treea14430fbb928e7b25ec29ac1e33cf9c62a13159f /source/blender/blenkernel
parentdf553582e96569e49a4d28c167c5dd334be5f216 (diff)
Renamed "fake" OpenGL identifiers.
Any identifier that looks like an OpenGL identifier, but isn't, causes a false alarm by the glreport.py tool. Most of these were in comments so I just rephrased the comments. There were a couple of static functions/macros that were easy enough to rename. Only the glTexco and glIndex fields of the DMVertexAttribs struct was public and had non-local uses.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_DerivedMesh.h8
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c30
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c20
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c20
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c20
5 files changed, 49 insertions, 49 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h
index 3a28af97166..a15192f156a 100644
--- a/source/blender/blenkernel/BKE_DerivedMesh.h
+++ b/source/blender/blenkernel/BKE_DerivedMesh.h
@@ -664,22 +664,22 @@ void DM_update_weight_mcol(struct Object *ob, struct DerivedMesh *dm, int const
typedef struct DMVertexAttribs {
struct {
struct MTFace *array;
- int emOffset, glIndex, glTexco;
+ int em_offset, gl_index, gl_texco;
} tface[MAX_MTFACE];
struct {
struct MCol *array;
- int emOffset, glIndex;
+ int em_offset, gl_index;
} mcol[MAX_MCOL];
struct {
float (*array)[4];
- int emOffset, glIndex;
+ int em_offset, gl_index;
} tang;
struct {
float (*array)[3];
- int emOffset, glIndex, glTexco;
+ int em_offset, gl_index, gl_texco;
} orco;
int tottface, totmcol, tottang, totorco;
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 74373d28c14..f648a9e297c 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -2786,9 +2786,9 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
a = attribs->tottface++;
attribs->tface[a].array = tfdata->layers[layer].data;
- attribs->tface[a].emOffset = tfdata->layers[layer].offset;
- attribs->tface[a].glIndex = gattribs->layer[b].glindex;
- attribs->tface[a].glTexco = gattribs->layer[b].gltexco;
+ attribs->tface[a].em_offset = tfdata->layers[layer].offset;
+ attribs->tface[a].gl_index = gattribs->layer[b].glindex;
+ attribs->tface[a].gl_texco = gattribs->layer[b].gltexco;
}
}
else {
@@ -2802,9 +2802,9 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
a = attribs->tottface++;
attribs->tface[a].array = tfdata->layers[layer].data;
- attribs->tface[a].emOffset = tfdata->layers[layer].offset;
- attribs->tface[a].glIndex = gattribs->layer[b].glindex;
- attribs->tface[a].glTexco = gattribs->layer[b].gltexco;
+ attribs->tface[a].em_offset = tfdata->layers[layer].offset;
+ attribs->tface[a].gl_index = gattribs->layer[b].glindex;
+ attribs->tface[a].gl_texco = gattribs->layer[b].gltexco;
}
}
}
@@ -2823,8 +2823,8 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
a = attribs->totmcol++;
attribs->mcol[a].array = tfdata->layers[layer].data;
- attribs->mcol[a].emOffset = tfdata->layers[layer].offset;
- attribs->mcol[a].glIndex = gattribs->layer[b].glindex;
+ attribs->mcol[a].em_offset = tfdata->layers[layer].offset;
+ attribs->mcol[a].gl_index = gattribs->layer[b].glindex;
}
}
else {
@@ -2839,8 +2839,8 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
a = attribs->totmcol++;
attribs->mcol[a].array = tfdata->layers[layer].data;
- attribs->mcol[a].emOffset = tfdata->layers[layer].offset;
- attribs->mcol[a].glIndex = gattribs->layer[b].glindex;
+ attribs->mcol[a].em_offset = tfdata->layers[layer].offset;
+ attribs->mcol[a].gl_index = gattribs->layer[b].glindex;
}
}
}
@@ -2852,8 +2852,8 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
attribs->tottang = 1;
attribs->tang.array = fdata->layers[layer].data;
- attribs->tang.emOffset = fdata->layers[layer].offset;
- attribs->tang.glIndex = gattribs->layer[b].glindex;
+ attribs->tang.em_offset = fdata->layers[layer].offset;
+ attribs->tang.gl_index = gattribs->layer[b].glindex;
}
}
else if (gattribs->layer[b].type == CD_ORCO) {
@@ -2864,9 +2864,9 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
attribs->totorco = 1;
attribs->orco.array = vdata->layers[layer].data;
- attribs->orco.emOffset = vdata->layers[layer].offset;
- attribs->orco.glIndex = gattribs->layer[b].glindex;
- attribs->orco.glTexco = gattribs->layer[b].gltexco;
+ attribs->orco.em_offset = vdata->layers[layer].offset;
+ attribs->orco.gl_index = gattribs->layer[b].glindex;
+ attribs->orco.gl_texco = gattribs->layer[b].gltexco;
}
}
}
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 19e66b957eb..78a8b975b85 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -989,20 +989,20 @@ static void cddm_draw_attrib_vertex(DMVertexAttribs *attribs, MVert *mvert, int
/* orco texture coordinates */
if (attribs->totorco) {
- if (attribs->orco.glTexco)
+ if (attribs->orco.gl_texco)
glTexCoord3fv(attribs->orco.array[index]);
else
- glVertexAttrib3fvARB(attribs->orco.glIndex, attribs->orco.array[index]);
+ glVertexAttrib3fvARB(attribs->orco.gl_index, attribs->orco.array[index]);
}
/* uv texture coordinates */
for (b = 0; b < attribs->tottface; b++) {
MTFace *tf = &attribs->tface[b].array[a];
- if (attribs->tface[b].glTexco)
+ if (attribs->tface[b].gl_texco)
glTexCoord2fv(tf->uv[vert]);
else
- glVertexAttrib2fvARB(attribs->tface[b].glIndex, tf->uv[vert]);
+ glVertexAttrib2fvARB(attribs->tface[b].gl_index, tf->uv[vert]);
}
/* vertex colors */
@@ -1010,13 +1010,13 @@ static void cddm_draw_attrib_vertex(DMVertexAttribs *attribs, MVert *mvert, int
MCol *cp = &attribs->mcol[b].array[a*4 + vert];
GLubyte col[4];
col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
- glVertexAttrib4ubvARB(attribs->mcol[b].glIndex, col);
+ glVertexAttrib4ubvARB(attribs->mcol[b].gl_index, col);
}
/* tangent for normal mapping */
if (attribs->tottang) {
float *tang = attribs->tang.array[a*4 + vert];
- glVertexAttrib4fvARB(attribs->tang.glIndex, tang);
+ glVertexAttrib4fvARB(attribs->tang.gl_index, tang);
}
/* vertex normal */
@@ -1167,25 +1167,25 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
if (attribs.totorco) {
- datatypes[numdata].index = attribs.orco.glIndex;
+ datatypes[numdata].index = attribs.orco.gl_index;
datatypes[numdata].size = 3;
datatypes[numdata].type = GL_FLOAT;
numdata++;
}
for (b = 0; b < attribs.tottface; b++) {
- datatypes[numdata].index = attribs.tface[b].glIndex;
+ datatypes[numdata].index = attribs.tface[b].gl_index;
datatypes[numdata].size = 2;
datatypes[numdata].type = GL_FLOAT;
numdata++;
}
for (b = 0; b < attribs.totmcol; b++) {
- datatypes[numdata].index = attribs.mcol[b].glIndex;
+ datatypes[numdata].index = attribs.mcol[b].gl_index;
datatypes[numdata].size = 4;
datatypes[numdata].type = GL_UNSIGNED_BYTE;
numdata++;
}
if (attribs.tottang) {
- datatypes[numdata].index = attribs.tang.glIndex;
+ datatypes[numdata].index = attribs.tang.gl_index;
datatypes[numdata].size = 4;
datatypes[numdata].type = GL_FLOAT;
numdata++;
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index 9fd6a4e9ba4..8d7ac99e2a3 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -1013,21 +1013,21 @@ static void emDM_drawMappedFacesGLSL(
#define PASSATTRIB(loop, eve, vert) { \
if (attribs.totorco) { \
float *orco = attribs.orco.array[BM_elem_index_get(eve)]; \
- glVertexAttrib3fvARB(attribs.orco.glIndex, orco); \
+ glVertexAttrib3fvARB(attribs.orco.gl_index, orco); \
} \
for (b = 0; b < attribs.tottface; b++) { \
MLoopUV *_luv = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPUV, b);\
- glVertexAttrib2fvARB(attribs.tface[b].glIndex, _luv->uv); \
+ glVertexAttrib2fvARB(attribs.tface[b].gl_index, _luv->uv); \
} \
for (b = 0; b < attribs.totmcol; b++) { \
MLoopCol *_cp = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPCOL, b);\
GLubyte _col[4]; \
_col[0]= _cp->b; _col[1]= _cp->g; _col[2]= _cp->r; _col[3]= _cp->a; \
- glVertexAttrib4ubvARB(attribs.mcol[b].glIndex, _col); \
+ glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, _col); \
} \
if (attribs.tottang) { \
float *tang = attribs.tang.array[i*4 + vert]; \
- glVertexAttrib3fvARB(attribs.tang.glIndex, tang); \
+ glVertexAttrib3fvARB(attribs.tang.gl_index, tang); \
} \
}
@@ -1136,27 +1136,27 @@ static void emDM_drawMappedFacesMat(
#define PASSATTRIB(loop, eve, vert) { \
if (attribs.totorco) { \
float *orco = attribs.orco.array[BM_elem_index_get(eve)]; \
- if (attribs.orco.glTexco) \
+ if (attribs.orco.gl_texco) \
glTexCoord3fv(orco); \
else \
- glVertexAttrib3fvARB(attribs.orco.glIndex, orco); \
+ glVertexAttrib3fvARB(attribs.orco.gl_index, orco); \
} \
for (b = 0; b < attribs.tottface; b++) { \
MLoopUV *_luv = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPUV, b);\
- if (attribs.tface[b].glTexco) \
+ if (attribs.tface[b].gl_texco) \
glTexCoord2fv(_luv->uv); \
else \
- glVertexAttrib2fvARB(attribs.tface[b].glIndex, _luv->uv); \
+ glVertexAttrib2fvARB(attribs.tface[b].gl_index, _luv->uv); \
} \
for (b = 0; b < attribs.totmcol; b++) { \
MLoopCol *_cp = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPCOL, b);\
GLubyte _col[4]; \
_col[0]= _cp->b; _col[1]= _cp->g; _col[2]= _cp->r; _col[3]= _cp->a; \
- glVertexAttrib4ubvARB(attribs.mcol[b].glIndex, _col); \
+ glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, _col); \
} \
if (attribs.tottang) { \
float *tang = attribs.tang.array[i*4 + vert]; \
- glVertexAttrib4fvARB(attribs.tang.glIndex, tang); \
+ glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
} \
}
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index ddc605eb3e0..b3b704bf2a2 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -1718,21 +1718,21 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm,
#define PASSATTRIB(dx, dy, vert) { \
if (attribs.totorco) { \
index = getFaceIndex(ss, f, S, x + dx, y + dy, edgeSize, gridSize); \
- glVertexAttrib3fvARB(attribs.orco.glIndex, attribs.orco.array[index]); \
+ glVertexAttrib3fvARB(attribs.orco.gl_index, attribs.orco.array[index]); \
} \
for (b = 0; b < attribs.tottface; b++) { \
MTFace *tf = &attribs.tface[b].array[a]; \
- glVertexAttrib2fvARB(attribs.tface[b].glIndex, tf->uv[vert]); \
+ glVertexAttrib2fvARB(attribs.tface[b].gl_index, tf->uv[vert]); \
} \
for (b = 0; b < attribs.totmcol; b++) { \
MCol *cp = &attribs.mcol[b].array[a * 4 + vert]; \
GLubyte col[4]; \
col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a; \
- glVertexAttrib4ubvARB(attribs.mcol[b].glIndex, col); \
+ glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, col); \
} \
if (attribs.tottang) { \
float *tang = attribs.tang.array[a * 4 + vert]; \
- glVertexAttrib4fvARB(attribs.tang.glIndex, tang); \
+ glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
} \
}
@@ -1863,27 +1863,27 @@ static void ccgDM_drawMappedFacesMat(DerivedMesh *dm, void (*setMaterial)(void *
#define PASSATTRIB(dx, dy, vert) { \
if (attribs.totorco) { \
index = getFaceIndex(ss, f, S, x + dx, y + dy, edgeSize, gridSize); \
- if (attribs.orco.glTexco) \
+ if (attribs.orco.gl_texco) \
glTexCoord3fv(attribs.orco.array[index]); \
else \
- glVertexAttrib3fvARB(attribs.orco.glIndex, attribs.orco.array[index]); \
+ glVertexAttrib3fvARB(attribs.orco.gl_index, attribs.orco.array[index]); \
} \
for (b = 0; b < attribs.tottface; b++) { \
MTFace *tf = &attribs.tface[b].array[a]; \
- if (attribs.tface[b].glTexco) \
+ if (attribs.tface[b].gl_texco) \
glTexCoord2fv(tf->uv[vert]); \
else \
- glVertexAttrib2fvARB(attribs.tface[b].glIndex, tf->uv[vert]); \
+ glVertexAttrib2fvARB(attribs.tface[b].gl_index, tf->uv[vert]); \
} \
for (b = 0; b < attribs.totmcol; b++) { \
MCol *cp = &attribs.mcol[b].array[a * 4 + vert]; \
GLubyte col[4]; \
col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a; \
- glVertexAttrib4ubvARB(attribs.mcol[b].glIndex, col); \
+ glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, col); \
} \
if (attribs.tottang) { \
float *tang = attribs.tang.array[a * 4 + vert]; \
- glVertexAttrib4fvARB(attribs.tang.glIndex, tang); \
+ glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
} \
}