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/space_sequencer/sequencer_draw.c | |
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/space_sequencer/sequencer_draw.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 299fe9df460..df1c0fa506e 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -99,7 +99,7 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[ UI_GetThemeColor3ubv(TH_SEQ_SCENE, col); if(seq->scene==curscene) { - UI_GetColorPtrBlendShade3ubv(col, col, col, 1.0, 20); + UI_GetColorPtrShade3ubv(col, col, 20); } break; @@ -299,7 +299,7 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1, glRectf(x1_chan, y1_chan, x2_chan, y2_chan); - UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -30); + UI_GetColorPtrShade3ubv(col, col, -30); glColor4ubv(col); fdrawbox(x1_chan, y1_chan, x2_chan, y2_chan); @@ -473,7 +473,7 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq) /* feint pinstripes, helps see exactly which is extended and which isn't, * especially when the extension is very small */ if (seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 24); - else UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -16); + else UI_GetColorPtrShade3ubv(col, col, -16); glColor3ubv((GLubyte *)col); @@ -490,8 +490,8 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq) /* feint pinstripes, helps see exactly which is extended and which isn't, * especially when the extension is very small */ - if (seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 24); - else UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -16); + if (seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, 24); + else UI_GetColorPtrShade3ubv(col, col, -16); glColor3ubv((GLubyte *)col); @@ -584,8 +584,8 @@ static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, floa glBegin(GL_QUADS); if(seq->flag & SEQ_INVALID_EFFECT) { col[0]= 255; col[1]= 0; col[2]= 255; } - else if(seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -50); - else UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 0); + else if(seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, -50); + /* else UI_GetColorPtrShade3ubv(col, col, 0); */ /* DO NOTHING */ glColor3ubv(col); @@ -594,7 +594,7 @@ static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, floa if(seq->flag & SEQ_INVALID_EFFECT) { col[0]= 255; col[1]= 0; col[2]= 255; } else if(seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 5); - else UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -5); + else UI_GetColorPtrShade3ubv(col, col, -5); glColor3ubv((GLubyte *)col); @@ -610,8 +610,8 @@ static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, floa glVertex2f(x1,ymid2); glVertex2f(x2,ymid2); - if(seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -15); - else UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 25); + if(seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, -15); + else UI_GetColorPtrShade3ubv(col, col, 25); glColor3ubv((GLubyte *)col); @@ -697,10 +697,10 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline col[0]= 255; col[1]= col[2]= 40; } else - UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 120+outline_tint); + UI_GetColorPtrShade3ubv(col, col, 120+outline_tint); } else - UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, outline_tint); + UI_GetColorPtrShade3ubv(col, col, outline_tint); glColor3ubv((GLubyte *)col); |