[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49203] branches/soc-2012-swiss_cheese/ source: glreport.py improvements

Jason Wilkins Jason.A.Wilkins at gmail.com
Wed Jul 25 15:08:27 CEST 2012


Revision: 49203
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49203
Author:   jwilkins
Date:     2012-07-25 13:08:27 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
glreport.py improvements

fixed various 'fake' gl tokens and added missing tokens to the database

Modified Paths:
--------------
    branches/soc-2012-swiss_cheese/source/blender/editors/armature/editarmature_sketch.c
    branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawarmature.c
    branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_codegen.h
    branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_extensions.c
    branches/soc-2012-swiss_cheese/source/blender/makesrna/intern/rna_image_api.c
    branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
    branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl
    branches/soc-2012-swiss_cheese/source/tools/GL/core.gl
    branches/soc-2012-swiss_cheese/source/tools/GL/extensions.gl
    branches/soc-2012-swiss_cheese/source/tools/GL/glreport.py
    branches/soc-2012-swiss_cheese/source/tools/GL/libraries.gl

Modified: branches/soc-2012-swiss_cheese/source/blender/editors/armature/editarmature_sketch.c
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/editors/armature/editarmature_sketch.c	2012-07-25 12:55:55 UTC (rev 49202)
+++ branches/soc-2012-swiss_cheese/source/blender/editors/armature/editarmature_sketch.c	2012-07-25 13:08:27 UTC (rev 49203)
@@ -458,7 +458,7 @@
 	glTranslatef(pt->p[0], pt->p[1], pt->p[2]);
 
 	gpuDrawSphere(prim, sk_clampPointSize(pt, size));
-	//GLU gluSphere(quad, sk_clampPointSize(pt, size), 8, 8);
+	//GLU Sphere(quad, sk_clampPointSize(pt, size), 8, 8);
 }
 
 static void sk_drawEdge(GPUprim3 *prim, SK_Point *pt0, SK_Point *pt1, float size)
@@ -479,7 +479,7 @@
 	glRotatef(angle * (float)(180.0 / M_PI) + 180.0f, axis[0], axis[1], axis[2]);
 
 	gpuDrawCylinder(prim, sk_clampPointSize(pt1, size), sk_clampPointSize(pt0, size), length);
-	//GLU gluCylinder(quad, sk_clampPointSize(pt1, size), sk_clampPointSize(pt0, size), length, 8, 8);
+	//GLU Cylinder(quad, sk_clampPointSize(pt1, size), sk_clampPointSize(pt0, size), length, 8, 8);
 }
 
 static void sk_drawNormal(GPUprim3 *prim, SK_Point *pt, float size, float height)
@@ -502,7 +502,7 @@
 	gpuCurrentColor3x(CPACK_CYAN);
 
 	gpuDrawCylinder(prim, sk_clampPointSize(pt, size), 0, sk_clampPointSize(pt, height));
-	//GLU gluCylinder(quad, sk_clampPointSize(pt, size), 0, sk_clampPointSize(pt, height), 10, 2);
+	//GLU Cylinder(quad, sk_clampPointSize(pt, size), 0, sk_clampPointSize(pt, height), 10, 2);
 
 	glPopMatrix();
 }
@@ -2126,7 +2126,7 @@
 			if (!dl) {
 				gpuPushImmediate();
 				gpuSingleSphere(&prim, 0.02);
-				//GLU gluSphere(quad, 0.02, 8, 8);
+				//GLU Sphere(quad, 0.02, 8, 8);
 				dl = gpuPopImmediate();
 			}
 			else {

Modified: branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawarmature.c
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawarmature.c	2012-07-25 12:55:55 UTC (rev 49202)
+++ branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawarmature.c	2012-07-25 13:08:27 UTC (rev 49203)
@@ -944,7 +944,7 @@
 		}
 
 		gpuDrawSphere(&prim, head);
-		//GLU gluSphere(qobj, head, 16, 10);
+		//GLU Sphere(qobj, head, 16, 10);
 	}
 
 	/*	Draw tip point */
@@ -963,7 +963,7 @@
 
 	glTranslatef(0.0f, 0.0f, length);
 	gpuDrawSphere(&prim, tail);
-	//GLU gluSphere(qobj, tail, 16, 10);
+	//GLU Sphere(qobj, tail, 16, 10);
 	glTranslatef(0.0f, 0.0f, -length);
 
 	/* base */
@@ -999,7 +999,7 @@
 			fac1 * head + (1.0f - fac1) * tail,
 			fac2 * tail + (1.0f - fac2) * head,
 			length - head - tail);
-		//GLU gluCylinder(qobj, fac1 * head + (1.0f - fac1) * tail, fac2 * tail + (1.0f - fac2) * head, length - head - tail, 16, 1);
+		//GLU Cylinder(qobj, fac1 * head + (1.0f - fac1) * tail, fac2 * tail + (1.0f - fac2) * head, length - head - tail, 16, 1);
 		glTranslatef(0.0f, 0.0f, -head);
 
 		glDisable(GL_POLYGON_OFFSET_FILL);
@@ -1007,18 +1007,18 @@
 		/* draw sphere on extrema */
 		glTranslatef(0.0f, 0.0f, length - tail);
 		gpuDrawSphere(&prim, fac2 * tail + (1.0f - fac2) * head);
-		//GLU gluSphere(qobj, fac2 * tail + (1.0f - fac2) * head, 16, 10);
+		//GLU Sphere(qobj, fac2 * tail + (1.0f - fac2) * head, 16, 10);
 		glTranslatef(0.0f, 0.0f, -length + tail);
 
 		glTranslatef(0.0f, 0.0f, head);
 		gpuDrawSphere(&prim,  fac1 * head + (1.0f - fac1) * tail);
-		//GLU gluSphere(qobj, fac1 * head + (1.0f - fac1) * tail, 16, 10);
+		//GLU Sphere(qobj, fac1 * head + (1.0f - fac1) * tail, 16, 10);
 	}
 	else {
 		/* 1 sphere in center */
 		glTranslatef(0.0f, 0.0f, (head + length - tail) / 2.0f);
 		gpuDrawSphere(&prim,  fac1 * head + (1.0f - fac1) * tail);
-		//GLU gluSphere(qobj, fac1 * head + (1.0f - fac1) * tail, 16, 10);
+		//GLU Sphere(qobj, fac1 * head + (1.0f - fac1) * tail, 16, 10);
 	}
 
 	/* restore */

Modified: branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawobject.c	2012-07-25 12:55:55 UTC (rev 49202)
+++ branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawobject.c	2012-07-25 13:08:27 UTC (rev 49203)
@@ -1398,7 +1398,7 @@
 		GPUprim3 prim = GPU_PRIM_LOFI_SOLID;
 
 		gpuPushImmediate();
-		//GLU gluSphere(qobj, 0.05, 8, 8);
+		//GLU Sphere(qobj, 0.05, 8, 8);
 		gpuSingleSphere(&prim, 0.05f);
 		displist = gpuPopImmediate();
 	}
@@ -5798,7 +5798,7 @@
 		gpuImmediateIndex(index);
 		gpuImmediateMaxIndexCount(96);
 
-		//GLU gluCylinder(qobj, 1.0, 0.0, 1.0, 8, 1);
+		//GLU Cylinder(qobj, 1.0, 0.0, 1.0, 8, 1);
 		gpuSingleCone(&prim, 1, 1);
 		displist = gpuPopImmediate();
 	}
@@ -6277,7 +6277,7 @@
 			gpuImmediateIndex(index);
 			gpuImmediateMaxIndexCount(48);
 
-			//GLU gluCylinder(qobj, 1.0, 1.0, 1.0, 8, 1);
+			//GLU Cylinder(qobj, 1.0, 1.0, 1.0, 8, 1);
 			gpuSingleCylinder(&prim, 1, 1, 1);
 			displist = gpuPopImmediate();
 		}
@@ -6304,7 +6304,7 @@
 			gpuImmediateIndex(index);
 			gpuImmediateMaxIndexCount(48);
 
-			//GLU gluCylinder(qobj, 1.0, 0.0, 1.0, 8, 1);
+			//GLU Cylinder(qobj, 1.0, 0.0, 1.0, 8, 1);
 			gpuSingleCone(&prim, 1, 1);
 			displist = gpuPopImmediate();
 		}

Modified: branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_codegen.h
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_codegen.h	2012-07-25 12:55:55 UTC (rev 49202)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_codegen.h	2012-07-25 13:08:27 UTC (rev 49203)
@@ -132,7 +132,7 @@
 	int attribid;			/* id for vertex attributes */
 	int bindtex;			/* input is responsible for binding the texture? */
 	int definetex;			/* input is responsible for defining the pixel? */
-	int textarget;			/* GL_TEXTURE_* */
+	int textarget;			/* GL texture enum */
 	int textype;			/* datatype */
 
 	struct Image *ima;		/* image */

Modified: branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_extensions.c
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_extensions.c	2012-07-25 12:55:55 UTC (rev 49202)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_extensions.c	2012-07-25 13:08:27 UTC (rev 49203)
@@ -314,7 +314,7 @@
 	int w, h;				/* width/height */
 	int number;				/* number for multitexture binding */
 	int refcount;			/* reference count */
-	GLenum target;			/* GL_TEXTURE_* */
+	GLenum target;			/* GL texture enum */
 	GLuint bindcode;		/* opengl identifier for texture */
 	int fromblender;		/* we got the texture from Blender */
 

Modified: branches/soc-2012-swiss_cheese/source/blender/makesrna/intern/rna_image_api.c
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/makesrna/intern/rna_image_api.c	2012-07-25 12:55:55 UTC (rev 49202)
+++ branches/soc-2012-swiss_cheese/source/blender/makesrna/intern/rna_image_api.c	2012-07-25 13:08:27 UTC (rev 49203)
@@ -209,7 +209,7 @@
 		error = (int)gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, ibuf->x, ibuf->y, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
 
 	if (!error) {
-		/* clean glError buffer */
+		/* clean GL error buffer */
 		while (glGetError() != GL_NO_ERROR) {}
 
 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, image->tpageflag & IMA_CLAMP_U ? GL_CLAMP : GL_REPEAT);

Modified: branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
===================================================================
--- branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/KX_BlenderMaterial.cpp	2012-07-25 12:55:55 UTC (rev 49202)
+++ branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/KX_BlenderMaterial.cpp	2012-07-25 13:08:27 UTC (rev 49203)
@@ -952,7 +952,7 @@
 	return NULL;
 }
 
-static unsigned int GL_array[11] = {
+static unsigned int blend_mode_enums[11] = {
 	GL_ZERO,
 	GL_ONE,
 	GL_SRC_COLOR,
@@ -974,11 +974,11 @@
 		bool value_found[2] = {false, false};
 		for (int i=0; i<11; i++)
 		{
-			if (b[0] == GL_array[i]) {
+			if (b[0] == blend_mode_enums[i]) {
 				value_found[0] = true;
 				mBlendFunc[0] = b[0];
 			}
-			if (b[1] == GL_array[i]) {
+			if (b[1] == blend_mode_enums[i]) {
 				value_found[1] = true;
 				mBlendFunc[1] = b[1];
 			}

Modified: branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/KX_PythonInit.cpp
===================================================================
--- branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/KX_PythonInit.cpp	2012-07-25 12:55:55 UTC (rev 49202)
+++ branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/KX_PythonInit.cpp	2012-07-25 13:08:27 UTC (rev 49203)
@@ -1509,7 +1509,7 @@
 	KX_MACRO_addTypesToDict(d, KX_ACTIONACT_LOOPEND,     ACT_ACTION_LOOP_END);
 	KX_MACRO_addTypesToDict(d, KX_ACTIONACT_PROPERTY,    ACT_ACTION_FROM_PROP);
 	
-	/* 7. GL_BlendFunc */
+	/* 7. GL BlendFunc */
 	KX_MACRO_addTypesToDict(d, BL_ZERO, GL_ZERO);
 	KX_MACRO_addTypesToDict(d, BL_ONE, GL_ONE);
 	KX_MACRO_addTypesToDict(d, BL_SRC_COLOR, GL_SRC_COLOR);

Modified: branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl
===================================================================
--- branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl	2012-07-25 12:55:55 UTC (rev 49202)
+++ branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl	2012-07-25 13:08:27 UTC (rev 49203)
@@ -1,4 +1,10 @@
+'IGNORE': set([
+    'gl_glx',
+    'GLimp_SetMode']),
+
 'BLENDER': set([
+    'GLarm',
+    'GLUarm',
 	'bglBegin',
 	'bglBuffer',
 	'bglEnd',
@@ -42,4 +48,5 @@
 	'stipple_diag_stripes_neg',
 	'stipple_diag_stripes_pos',
 	'stipple_halftone',
-	'stipple_quarttone']),
+	'stipple_quarttone',
+    'bgl_sphere_project']),

Modified: branches/soc-2012-swiss_cheese/source/tools/GL/core.gl
===================================================================
--- branches/soc-2012-swiss_cheese/source/tools/GL/core.gl	2012-07-25 12:55:55 UTC (rev 49202)
+++ branches/soc-2012-swiss_cheese/source/tools/GL/core.gl	2012-07-25 13:08:27 UTC (rev 49203)
@@ -1,4 +1,10 @@
-'GLSL': set([
+'GLSL':	set([
+	'gl_ModelViewProjectionMatrix',
+    'gl_Position',
+	'gl_Normal',
+	'gl_NormalMatrix',
+	'gl_ProjectionMatrix',
+	'gl_Vertex',
 	'gl_FragColor',
 	'gl_ModelViewMatrix',
 	'gl_TexCoord']),
@@ -497,7 +503,7 @@

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list