diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-11 08:31:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-11 08:31:09 +0400 |
commit | 6eaae376a89ee1b0c38d7ff61017a6ba914055bd (patch) | |
tree | 685cd12c4e3f8673e8931e9ae66b4af9471fbdf8 /source/blender/editors/include/UI_resources.h | |
parent | 599cd56f535946726bc30e66e7ac483ec91ab6fd (diff) |
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.
Diffstat (limited to 'source/blender/editors/include/UI_resources.h')
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 3 |
1 files changed, 3 insertions, 0 deletions
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); |