diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-21 05:30:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-21 05:30:26 +0400 |
commit | 98774eba0e459faf801d5be4bed3588b75166a1b (patch) | |
tree | 870566da7a5477b997210a3f6c86724ed74b9ba8 /source/blender/editors/space_view3d/view3d_intern.h | |
parent | 28780342eddb0e1e767bf64d69cb99bd138d621f (diff) |
fix [#28037] Missing orange selection lines (trivial)
From what I can tell there is no good fix for this bug, calculating the 2d/3d viewborder and then attempting to align them to be pixel perfect fails because of float imprecision.
Added a workaround, so the camera border is always drawn in 2d space,
since this workaround may cause problems later on its kept under the define VIEW3D_CAMERA_BORDER_HACK so we can get old behavior back easily.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_intern.h')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_intern.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index aa92f0d0a59..d3886d48873 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -194,6 +194,16 @@ extern const char *view3d_context_dir[]; /* doc access */ /* draw_volume.c */ void draw_volume(struct ARegion *ar, struct GPUTexture *tex, float *min, float *max, int res[3], float dx, struct GPUTexture *tex_shadow); +/* workaround for trivial but noticable camera bug caused by imprecision + * between view border calculation in 2D/3D space, workaround for bug [#28037]. + * without this deifne we get the old behavior which is to try and align them + * both which _mostly_ works fine, but when the camera moves beyond ~1000 in + * any direction it starts to fail */ +#define VIEW3D_CAMERA_BORDER_HACK +#ifdef VIEW3D_CAMERA_BORDER_HACK +extern float view3d_camera_border_hack_col[4]; +extern short view3d_camera_border_hack_test; +#endif #endif /* ED_VIEW3D_INTERN_H */ |