From 6eaae376a89ee1b0c38d7ff61017a6ba914055bd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 11 Sep 2011 04:31:09 +0000 Subject: simple changes to grid drawing logic. - make ortho grid drawing use vertex arrays - make perspective view floor drawing cache result of UI_ThemeColorShade so its not called on every line. - make perspective view floor only loop once on each axis when the grid floor isnt being drawn (was looking over all grid lines for no reason). - add UI_GetColorPtrShade3ubv() to replace UI_GetColorPtrBlendShade3ubv() when no blending is needed. --- source/blender/editors/include/UI_resources.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/include/UI_resources.h') diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index d383bc0ab78..ab5b8e8aff3 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -296,6 +296,9 @@ void UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4]); // blends and shades between two color pointers void UI_ColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], float fac, int offset); +// shade a 3 byte color (same as UI_GetColorPtrBlendShade3ubv with 0.0 factor) +void UI_GetColorPtrShade3ubv(const unsigned char cp1[3], unsigned char col[3], int offset); + // get a 3 byte color, blended and shaded between two other char color pointers void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], unsigned char col[3], float fac, int offset); -- cgit v1.2.3