[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50002] branches/soc-2012-swiss_cheese/ source/blender/editors/space_view3d/drawarmature.c: Added missing gpuImmediateFormat/ gpuImmediateUnformat for drawing certain kinds of bones.
Jason Wilkins
Jason.A.Wilkins at gmail.com
Sun Aug 19 05:59:54 CEST 2012
Revision: 50002
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50002
Author: jwilkins
Date: 2012-08-19 03:59:50 +0000 (Sun, 19 Aug 2012)
Log Message:
-----------
Added missing gpuImmediateFormat/gpuImmediateUnformat for drawing certain kinds of bones.
Modified Paths:
--------------
branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawarmature.c
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-08-19 03:46:51 UTC (rev 50001)
+++ branches/soc-2012-swiss_cheese/source/blender/editors/space_view3d/drawarmature.c 2012-08-19 03:59:50 UTC (rev 50002)
@@ -962,12 +962,14 @@
float length;
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
+
if (pchan)
length = pchan->bone->length;
else
length = ebone->length;
-
+
+ gpuImmediateFormat_V3();
+
gpuPushMatrix();
gpuScale(length, length, length);
@@ -1062,6 +1064,8 @@
gpuPopMatrix();
+ gpuImmediateUnformat();
+
glPixelStorei(GL_UNPACK_ALIGNMENT, 4); /* restore default value */
}
@@ -1892,10 +1896,12 @@
UI_ThemeColor(TH_WIRE);
}
setlinestyle(3);
+ gpuImmediateFormat_V3();
gpuBegin(GL_LINES);
gpuVertex3fv(pchan->pose_head);
gpuVertex3fv(pchan->parent->pose_tail);
gpuEnd();
+ gpuImmediateUnformat();
setlinestyle(0);
}
More information about the Bf-blender-cvs
mailing list