[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46270] trunk/blender: Renamed "fake" OpenGL identifiers.

Jason Wilkins Jason.A.Wilkins at gmail.com
Fri May 4 13:50:11 CEST 2012


Revision: 46270
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46270
Author:   jwilkins
Date:     2012-05-04 11:50:11 +0000 (Fri, 04 May 2012)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
    trunk/blender/source/blender/blenfont/intern/blf_internal_types.h
    trunk/blender/source/blender/blenkernel/BKE_DerivedMesh.h
    trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c
    trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c
    trunk/blender/source/blender/blenkernel/intern/editderivedmesh.c
    trunk/blender/source/blender/blenkernel/intern/subsurf_ccg.c
    trunk/blender/source/blender/editors/include/BIF_glutil.h
    trunk/blender/source/blender/editors/interface/interface_draw.c
    trunk/blender/source/blender/editors/screen/glutil.c
    trunk/blender/source/blender/editors/space_view3d/drawarmature.c
    trunk/blender/source/blender/editors/space_view3d/drawobject.c
    trunk/blender/source/blender/gpu/intern/gpu_draw.c
    trunk/blender/source/blender/windowmanager/intern/wm_draw.c
    trunk/blender/source/blender/windowmanager/intern/wm_subwindow.c

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp	2012-05-04 11:49:58 UTC (rev 46269)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp	2012-05-04 11:50:11 UTC (rev 46270)
@@ -55,7 +55,7 @@
 #endif
 
 // Some more multisample defines
-#define WGL_SAMPLE_BUFERS_ARB	0x2041
+#define WGL_SAMPLE_BUFFERS_ARB	0x2041
 #define	WGL_SAMPLES_ARB			0x2042
 
 // win64 doesn't define GWL_USERDATA

Modified: trunk/blender/source/blender/blenfont/intern/blf_internal_types.h
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf_internal_types.h	2012-05-04 11:49:58 UTC (rev 46269)
+++ trunk/blender/source/blender/blenfont/intern/blf_internal_types.h	2012-05-04 11:50:11 UTC (rev 46270)
@@ -180,7 +180,7 @@
 	/* max texture size. */
 	int max_tex_size;
 
-	/* current opengl texture  bind, avoids calling glGet */
+	/* cache current OpenGL texture to save calls into the API */
 	int tex_bind_state;
 
 	/* font options. */

Modified: trunk/blender/source/blender/blenkernel/BKE_DerivedMesh.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_DerivedMesh.h	2012-05-04 11:49:58 UTC (rev 46269)
+++ trunk/blender/source/blender/blenkernel/BKE_DerivedMesh.h	2012-05-04 11:50:11 UTC (rev 46270)
@@ -664,22 +664,22 @@
 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;

Modified: trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c	2012-05-04 11:49:58 UTC (rev 46269)
+++ trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c	2012-05-04 11:50:11 UTC (rev 46270)
@@ -2786,9 +2786,9 @@
 					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 @@
 					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 @@
 					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 @@
 					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 @@
 				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 @@
 				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;
 			}
 		}
 	}

Modified: trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c	2012-05-04 11:49:58 UTC (rev 46269)
+++ trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c	2012-05-04 11:50:11 UTC (rev 46270)
@@ -989,20 +989,20 @@
 
 	/* 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 @@
 		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 @@
 						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++;

Modified: trunk/blender/source/blender/blenkernel/intern/editderivedmesh.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/editderivedmesh.c	2012-05-04 11:49:58 UTC (rev 46269)
+++ trunk/blender/source/blender/blenkernel/intern/editderivedmesh.c	2012-05-04 11:50:11 UTC (rev 46270)
@@ -1013,21 +1013,21 @@
 #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 @@
 #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++) {										\

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list