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:
authorCampbell Barton <ideasman42@gmail.com>2013-05-08 17:00:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-08 17:00:52 +0400
commit562ed2b42e7ad8298bd5f041124ed2208c3a7a7c (patch)
treec006fdb389d4596ffa6eddb6ac0ffc670cb192bf /source/blender/editors/space_view3d/space_view3d.c
parenta4634bfe6725be8c1d56588d2f1660ee08cb11ad (diff)
add in asserts when rv3d->viewmatob, rv3d->persmatob are not initialized.
This is often hard to spot since in many cases it works correctly even when not initialized but may still fail in other situations.
Diffstat (limited to 'source/blender/editors/space_view3d/space_view3d.c')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 45274cbd619..363eea480b9 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -243,6 +243,21 @@ void ED_view3d_init_mats_rv3d_gl(struct Object *ob, struct RegionView3D *rv3d)
glMultMatrixf(ob->obmat);
}
+#ifdef DEBUG
+/* ensure we correctly initialize */
+void ED_view3d_clear_mats_rv3d(struct RegionView3D *rv3d)
+{
+ zero_m4(rv3d->viewmatob);
+ zero_m4(rv3d->persmatob);
+}
+
+void ED_view3d_check_mats_rv3d(struct RegionView3D *rv3d)
+{
+ BLI_ASSERT_ZERO_M4(rv3d->viewmatob);
+ BLI_ASSERT_ZERO_M4(rv3d->persmatob);
+}
+#endif
+
/* ******************** default callbacks for view3d space ***************** */
static SpaceLink *view3d_new(const bContext *C)