[Bf-blender-cvs] [32b481f] temp_viewport_fx_merge: No declarations in for-loops and warning fixes for matrix pointers

Antony Riakiotakis noreply at git.blender.org
Fri Apr 3 15:51:25 CEST 2015


Commit: 32b481f873380b5f30dd8b88243449dd3e173254
Author: Antony Riakiotakis
Date:   Fri Apr 3 15:51:09 2015 +0200
Branches: temp_viewport_fx_merge
https://developer.blender.org/rB32b481f873380b5f30dd8b88243449dd3e173254

No declarations in for-loops and warning fixes for matrix pointers

===================================================================

M	source/blender/editors/interface/interface_widgets.c
M	source/blender/editors/mask/mask_draw.c
M	source/blender/editors/mesh/editmesh_knife.c
M	source/blender/editors/mesh/editmesh_loopcut.c
M	source/blender/editors/space_clip/clip_draw.c
M	source/blender/editors/space_clip/space_clip.c
M	source/blender/editors/space_view3d/drawanimviz.c
M	source/blender/editors/space_view3d/drawarmature.c
M	source/blender/editors/space_view3d/drawmesh.c
M	source/blender/editors/space_view3d/drawobject.c
M	source/blender/editors/space_view3d/drawsimdebug.c
M	source/blender/editors/space_view3d/space_view3d.c
M	source/blender/editors/space_view3d/view3d_draw.c
M	source/blender/editors/space_view3d/view3d_view.c
M	source/blender/editors/transform/transform.c
M	source/blender/editors/transform/transform_manipulator.c
M	source/blender/gpu/GPU_matrix.h

===================================================================

diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 5886ac8..e3761f8 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -546,8 +546,9 @@ static void widget_trias_draw(uiWidgetTrias *tria)
 	glDisableClientState(GL_VERTEX_ARRAY);
 #else
 	const unsigned *idx = (const unsigned *)tria->index;
+	unsigned int i;
 	glBegin(GL_TRIANGLES);
-	for (unsigned i = 0; i < tria->tot * 3; ++i)
+	for (i = 0; i < tria->tot * 3; ++i)
 		glVertex3fv((float *)&tria->vec[idx[i]]);
 	glEnd();
 #endif
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c
index e5ec580..d73f89c 100644
--- a/source/blender/editors/mask/mask_draw.c
+++ b/source/blender/editors/mask/mask_draw.c
@@ -819,7 +819,7 @@ void ED_mask_draw_region(Mask *mask, ARegion *ar,
 		gpuTranslate(x, y, 0);
 		gpuScale(zoomx, zoomy, 0);
 		if (stabmat) {
-			gpuMultMatrix(stabmat);
+			gpuMultMatrix(stabmat[0]);
 		}
 		glaDrawPixelsTex(0.0f, 0.0f, width, height, format, GL_FLOAT, GL_NEAREST, buffer);
 		gpuPopMatrix();
@@ -835,7 +835,7 @@ void ED_mask_draw_region(Mask *mask, ARegion *ar,
 	gpuPushMatrix();
 
 	if (stabmat) {
-		gpuMultMatrix(stabmat);
+		gpuMultMatrix(stabmat[0]);
 	}
 
 	gpuTranslate(x + xofs, y + yofs, 0);
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index d8ae2a9..6341ab2 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1028,7 +1028,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
 	glPolygonOffset(1.0f, 1.0f);
 
 	gpuPushMatrix();
-	gpuMultMatrix(kcd->ob->obmat);
+	gpuMultMatrix(kcd->ob->obmat[0]);
 
 	if (kcd->mode == MODE_DRAGGING) {
 		if (kcd->angle_snapping != ANGLE_FREE)
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 24962b92..bd7d5d2 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -102,7 +102,7 @@ static void ringsel_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
 			glDisable(GL_DEPTH_TEST);
 
 		gpuPushMatrix();
-		gpuMultMatrix(lcd->ob->obmat);
+		gpuMultMatrix(lcd->ob->obmat[0]);
 
 		glColor3ub(255, 0, 255);
 		if (lcd->totedge > 0) {
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 7e0772f..473903f 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -337,7 +337,7 @@ static void draw_stabilization_border(SpaceClip *sc, ARegion *ar, int width, int
 		gpuTranslate(x, y, 0.0f);
 
 		gpuScale(zoomx, zoomy, 1.0f);
-		gpuMultMatrix(sc->stabmat);
+		gpuMultMatrix(sc->stabmat[0]);
 
 		glBegin(GL_LINE_LOOP);
 		glVertex2f(0.0f, 0.0f);
@@ -1093,7 +1093,7 @@ static void draw_plane_marker_image(Scene *scene,
 			             GL_UNSIGNED_BYTE, display_buffer);
 
 			gpuPushMatrix();
-			gpuMultMatrix(gl_matrix);
+			gpuMultMatrix(gl_matrix[0]);
 
 			glBegin(GL_QUADS);
 			glTexCoord2f(0.0f, 0.0f); glVertex2f(0.0f, 0.0f);
@@ -1263,7 +1263,7 @@ static void draw_tracking_tracks(SpaceClip *sc, Scene *scene, ARegion *ar, Movie
 
 	gpuPushMatrix();
 	gpuScale(zoomx, zoomy, 0);
-	gpuMultMatrix(sc->stabmat);
+	gpuMultMatrix(sc->stabmat[0]);
 	gpuScale(width, height, 0);
 
 	act_track = BKE_tracking_track_get_active(tracking);
@@ -1503,7 +1503,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip,
 	gpuPushMatrix();
 	gpuTranslate(x, y, 0);
 	gpuScale(zoomx, zoomy, 0);
-	gpuMultMatrix(sc->stabmat);
+	gpuMultMatrix(sc->stabmat[0]);
 	gpuScale(width, height, 0);
 
 	/* grid */
@@ -1770,7 +1770,7 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d)
 		 */
 		if ((sc->flag & SC_MANUAL_CALIBRATION) == 0 || is_track_source) {
 			gpuPushMatrix();
-			gpuMultMatrix(sc->unistabmat);
+			gpuMultMatrix(sc->unistabmat[0]);
 
 			if (is_track_source) {
 				MovieTrackingTrack *track = BKE_tracking_track_get_active(&sc->clip->tracking);
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 607095f..c2623f0 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -1220,7 +1220,7 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar)
 		gpuPushMatrix();
 		gpuTranslate(x, y, 0);
 		gpuScale(zoomx, zoomy, 0);
-		gpuMultMatrix(sc->stabmat);
+		gpuMultMatrix(sc->stabmat[0]);
 		gpuScale(width, height, 0);
 		ED_image_draw_cursor(ar, sc->cursor);
 		gpuPopMatrix();
diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c
index bbc0efa..2117b0d 100644
--- a/source/blender/editors/space_view3d/drawanimviz.c
+++ b/source/blender/editors/space_view3d/drawanimviz.c
@@ -73,7 +73,7 @@ void draw_motion_paths_init(View3D *v3d, ARegion *ar)
 	if (v3d->zbuf) glDisable(GL_DEPTH_TEST);
 	
 	gpuPushMatrix();
-	gpuLoadMatrix(rv3d->viewmat);
+	gpuLoadMatrix(rv3d->viewmat[0]);
 }
 
 /* Draw the given motion path for an Object or a Bone 
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 541646c..3064d71 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -1103,7 +1103,7 @@ static void draw_b_bone_boxes(const short dt, bPoseChannel *pchan, float xwidth,
 
 		for (a = 0; a < segments; a++) {
 			gpuPushMatrix();
-			gpuMultMatrix(bbone[a].mat);
+			gpuMultMatrix(bbone[a].mat[0]);
 			if (dt == OB_SOLID) drawsolidcube_size(xwidth, dlen, zwidth);
 			else drawcube_size(xwidth, dlen, zwidth);
 			gpuPopMatrix();
@@ -1209,7 +1209,7 @@ static void draw_wire_bone_segments(bPoseChannel *pchan, Mat4 *bbones, float len
 		
 		for (a = 0; a < segments; a++, bbone++) {
 			gpuPushMatrix();
-			gpuMultMatrix(bbone->mat);
+			gpuMultMatrix(bbone->mat[0]);
 			
 			glBegin(GL_LINES);
 			glVertex3f(0.0f, 0.0f, 0.0f);
@@ -1550,11 +1550,11 @@ static void draw_pose_dofs(Object *ob)
 							if (pchan->parent) {
 								copy_m4_m4(mat, pchan->parent->pose_mat);
 								mat[3][0] = mat[3][1] = mat[3][2] = 0.0f;
-								gpuMultMatrix(mat);
+								gpuMultMatrix(mat[0]);
 							}
 							
 							copy_m4_m3(mat, pchan->bone->bone_mat);
-							gpuMultMatrix(mat);
+							gpuMultMatrix(mat[0]);
 							
 							scale = bone->length * pchan->size[1];
 							gpuScale(scale, scale, scale);
@@ -1740,10 +1740,10 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
 					gpuPushMatrix();
 					
 					if (use_custom && pchan->custom_tx) {
-						gpuMultMatrix(pchan->custom_tx->pose_mat);
+						gpuMultMatrix(pchan->custom_tx->pose_mat[0]);
 					}
 					else {
-						gpuMultMatrix(pchan->pose_mat);
+						gpuMultMatrix(pchan->pose_mat[0]);
 					}
 					
 					/* catch exception for bone with hidden parent */
@@ -1841,10 +1841,10 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
 							gpuPushMatrix();
 							
 							if (pchan->custom_tx) {
-								gpuMultMatrix(pchan->custom_tx->pose_mat);
+								gpuMultMatrix(pchan->custom_tx->pose_mat[0]);
 							}
 							else {
-								gpuMultMatrix(pchan->pose_mat);
+								gpuMultMatrix(pchan->pose_mat[0]);
 							}
 							
 							/* prepare colors */
@@ -1961,7 +1961,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
 					
 					gpuPushMatrix();
 					if (arm->drawtype != ARM_ENVELOPE)
-						gpuMultMatrix(pchan->pose_mat);
+						gpuMultMatrix(pchan->pose_mat[0]);
 					
 					/* catch exception for bone with hidden parent */
 					flag = bone->flag;
@@ -2071,7 +2071,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
 							gpuPushMatrix();
 							copy_m4_m4(bmat, pchan->pose_mat);
 							bone_matrix_translate_y(bmat, pchan->bone->length);
-							gpuMultMatrix(bmat);
+							gpuMultMatrix(bmat[0]);
 							
 							glColor3ubv(col);
 							drawaxes(pchan->bone->length * 0.25f, OB_ARROWS);
@@ -2146,7 +2146,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt)
 				if ((eBone->flag & BONE_HIDDEN_A) == 0) {
 					gpuPushMatrix();
 					get_matrix_editbone(eBone, bmat);
-					gpuMultMatrix(bmat);
+					gpuMultMatrix(bmat[0]);
 					
 					/* catch exception for bone with hidden parent */
 					flag = eBone->flag;
@@ -2208,7 +2208,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt)
 				else {
 					gpuPushMatrix();
 					get_matrix_editbone(eBone, bmat);
-					gpuMultMatrix(bmat);
+					gpuMultMatrix(bmat[0]);
 					
 					if (arm->drawtype == ARM_LINE) 
 						draw_line_bone(arm->flag, flag, 0, index, NULL, eBone);
@@ -2279,7 +2279,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt)
 							gpuPushMatrix();
 							get_matrix_editbone(eBone, bmat);
 							bone_matrix_translate_y(bmat, eBone->length);
-							gpuMultMatrix(bmat);
+							gpuMultMatrix(bmat[0]);
 
 							glColor3ubv(col);
 							drawaxes(eBone->length * 0.25f, OB_ARROWS);
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 33d610c..781f618 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -1019,7 +1019,7 @@ static void tex_mat_set_texture_cb(void *userData, int mat_nr, void *attribs)
 			glColor3f(1.0f, 1.0f, 1.0f);
 
 			gpuMatrixMode(GL_TEXTURE);
-			gpuLoadMatrix(texbase->tex_mapping.mat);
+			gpuLoadMatrix(texbase->tex_mapping.mat[0]);
 			gpuMatrixMode(GL_MODELVIEW);
 
 			/* use active UV texture layer */
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index f2e2b1c..3b799bb 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1177,7 +1177,7 @@ static void drawlamp(View3D *v3d, Region

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list