[Bf-blender-cvs] [942b98e] temp_viewport_fx_merge: Use stubs for glrecti/glrectf to make sure the matrix stacks have been committed.
Antony Riakiotakis
noreply at git.blender.org
Mon May 11 18:02:43 CEST 2015
Commit: 942b98e55cc6043ebc383b55109cddc7fa9b41ea
Author: Antony Riakiotakis
Date: Mon May 11 18:02:15 2015 +0200
Branches: temp_viewport_fx_merge
https://developer.blender.org/rB942b98e55cc6043ebc383b55109cddc7fa9b41ea
Use stubs for glrecti/glrectf to make sure the matrix stacks have been
committed.
===================================================================
M source/blender/editors/animation/anim_channels_defines.c
M source/blender/editors/animation/anim_draw.c
M source/blender/editors/animation/anim_markers.c
M source/blender/editors/animation/keyframes_draw.c
M source/blender/editors/interface/interface_draw.c
M source/blender/editors/interface/interface_panel.c
M source/blender/editors/interface/interface_widgets.c
M source/blender/editors/interface/view2d.c
M source/blender/editors/screen/area.c
M source/blender/editors/screen/glutil.c
M source/blender/editors/screen/screen_edit.c
M source/blender/editors/space_action/action_draw.c
M source/blender/editors/space_clip/clip_dopesheet_draw.c
M source/blender/editors/space_clip/clip_draw.c
M source/blender/editors/space_clip/clip_utils.c
M source/blender/editors/space_console/console_draw.c
M source/blender/editors/space_file/file_draw.c
M source/blender/editors/space_image/image_draw.c
M source/blender/editors/space_info/textview.c
M source/blender/editors/space_nla/nla_draw.c
M source/blender/editors/space_node/node_draw.c
M source/blender/editors/space_outliner/outliner_draw.c
M source/blender/editors/space_sequencer/sequencer_draw.c
M source/blender/editors/space_text/text_draw.c
M source/blender/editors/space_time/space_time.c
M source/blender/editors/space_view3d/view3d_draw.c
M source/blender/editors/transform/transform_snap.c
M source/blender/gpu/GPU_immediate.h
M source/blender/gpu/intern/gpu_immediate.c
M source/gameengine/Ketsji/KX_Dome.cpp
===================================================================
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index ebd05d8..28f03ff 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -77,6 +77,8 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
+#include "GPU_immediate.h"
+
#include "WM_api.h"
#include "WM_types.h"
@@ -146,7 +148,7 @@ static void acf_generic_dataexpand_backdrop(bAnimContext *ac, bAnimListElem *ale
glColor3fv(color);
/* no rounded corner - just rectangular box */
- glRectf(offset, yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
+ GPURectf(offset, yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
}
/* helper method to test if group colors should be drawn */
@@ -227,7 +229,7 @@ static void acf_generic_channel_backdrop(bAnimContext *ac, bAnimListElem *ale, f
glColor3fv(color);
/* no rounded corners - just rectangular box */
- glRectf(offset, yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
+ GPURectf(offset, yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
}
/* Indention + Offset ------------------------------------------- */
@@ -3663,7 +3665,7 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
/* just a solid color rect
*/
- glRectf(offset, yminc, offset + ICON_WIDTH, ymaxc);
+ GPURectf(offset, yminc, offset + ICON_WIDTH, ymaxc);
}
/* icon is drawn as widget now... */
@@ -3776,7 +3778,7 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
* - starts from the point where the first toggle/slider starts,
* - ends past the space that might be reserved for a scroller
*/
- glRectf(v2d->cur.xmax - (float)offset, yminc + ymin_ofs, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
+ GPURectf(v2d->cur.xmax - (float)offset, yminc + ymin_ofs, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
}
}
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 4e629e6..3698fb8 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -92,7 +92,7 @@ static void draw_cfra_number(Scene *scene, View2D *v2d, const float cfra, const
/* draw green box around/behind text */
UI_ThemeColorShade(TH_CFRAME, 0);
- glRectf(x, y, x + slen, y + 0.75f * U.widget_unit);
+ GPURectf(x, y, x + slen, y + 0.75f * U.widget_unit);
/* draw current frame number - black text */
UI_ThemeColor(TH_TEXT);
@@ -150,11 +150,11 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width)
/* only draw two separate 'curtains' if there's no overlap between them */
if (PSFRA < PEFRA + end_frame_width) {
- glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax);
- glRectf((float)(PEFRA + end_frame_width), v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
+ GPURectf(v2d->cur.xmin, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax);
+ GPURectf((float)(PEFRA + end_frame_width), v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
}
else {
- glRectf(v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
+ GPURectf(v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
}
glDisable(GL_BLEND);
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index f3ebad8..e60707b 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -448,7 +448,7 @@ void ED_markers_draw(const bContext *C, int flag)
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glRectf(v2d->cur.xmin, 0, v2d->cur.xmax, UI_MARKER_MARGIN_Y);
+ GPURectf(v2d->cur.xmin, 0, v2d->cur.xmax, UI_MARKER_MARGIN_Y);
glDisable(GL_BLEND);
}
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index da1e671..dbeca76 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -597,7 +597,7 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa
else
glColor4fv(unsel_color);
- glRectf(ab->start, ypos - iconsize, ab->end, ypos + iconsize);
+ GPURectf(ab->start, ypos - iconsize, ab->end, ypos + iconsize);
}
}
}
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index e1acfda..4c53c7e 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -401,7 +401,7 @@ void UI_draw_roundbox(float minx, float miny, float maxx, float maxy, float rad)
void UI_draw_text_underline(int pos_x, int pos_y, int len, int height)
{
int ofs_y = 4 * U.pixelsize;
- glRecti(pos_x, pos_y - ofs_y, pos_x + len, pos_y - ofs_y + (height * U.pixelsize));
+ GPURecti(pos_x, pos_y - ofs_y, pos_x + len, pos_y - ofs_y + (height * U.pixelsize));
}
/* ************** SPECIAL BUTTON DRAWING FUNCTIONS ************* */
@@ -1135,11 +1135,11 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), const rcti
/* layer: background, to show tranparency */
glColor4ub(UI_ALPHA_CHECKER_DARK, UI_ALPHA_CHECKER_DARK, UI_ALPHA_CHECKER_DARK, 255);
- glRectf(x1, y1, x1 + sizex, rect->ymax);
+ GPURectf(x1, y1, x1 + sizex, rect->ymax);
glEnable(GL_POLYGON_STIPPLE);
glColor4ub(UI_ALPHA_CHECKER_LIGHT, UI_ALPHA_CHECKER_LIGHT, UI_ALPHA_CHECKER_LIGHT, 255);
glPolygonStipple(stipple_checker_8px);
- glRectf(x1, y1, x1 + sizex, rect->ymax);
+ GPURectf(x1, y1, x1 + sizex, rect->ymax);
glDisable(GL_POLYGON_STIPPLE);
/* layer: color ramp */
@@ -1399,16 +1399,16 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, const rcti
else {
if (cumap->flag & CUMA_DO_CLIP) {
gl_shaded_color((unsigned char *)wcol->inner, -20);
- glRectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax);
+ GPURectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax);
glColor3ubv((unsigned char *)wcol->inner);
- glRectf(rect->xmin + zoomx * (cumap->clipr.xmin - offsx),
+ GPURectf(rect->xmin + zoomx * (cumap->clipr.xmin - offsx),
rect->ymin + zoomy * (cumap->clipr.ymin - offsy),
rect->xmin + zoomx * (cumap->clipr.xmax - offsx),
rect->ymin + zoomy * (cumap->clipr.ymax - offsy));
}
else {
glColor3ubv((unsigned char *)wcol->inner);
- glRectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax);
+ GPURectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax);
}
/* grid, every 0.25 step */
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index a140fce..bd64814 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -523,9 +523,9 @@ static void ui_draw_panel_dragwidget(const rctf *rect)
const int y_co = (y_min + y_ofs) + (i_y * (box_size + box_margin));
glColor3ubv(col_dark);
- glRectf(x_co - box_size, y_co - px_zoom, x_co, (y_co + box_size) - px_zoom);
+ GPURectf(x_co - box_size, y_co - px_zoom, x_co, (y_co + box_size) - px_zoom);
glColor3ubv(col_high);
- glRectf(x_co - box_size, y_co, x_co, y_co + box_size);
+ GPURectf(x_co - box_size, y_co, x_co, y_co + box_size);
}
}
}
@@ -590,7 +590,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, const rcti *rect, con
if (UI_GetThemeValue(TH_PANEL_SHOW_HEADER)) {
/* draw with background color */
UI_ThemeColor4(TH_PANEL_HEADER);
- glRectf(minx, headrect.ymin + 1, maxx, y);
+ GPURectf(minx, headrect.ymin + 1, maxx, y);
fdrawline(minx, y, maxx, y);
fdrawline(minx, y, maxx, y);
@@ -663,7 +663,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, const rcti *rect, con
/* draw with background color */
glEnable(GL_BLEND);
UI_ThemeColor4(TH_PANEL_BACK);
- glRecti(rect->xmin, rect->ymin, rect->xmax, rect->ymax);
+ GPURecti(rect->xmin, rect->ymin, rect->xmax, rect->ymax);
}
if (panel->control & UI_PNL_SCALE)
@@ -1722,7 +1722,7 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
glColor3ubv(theme_col_tab_bg);
}
- glRecti(v2d->mask.xmin, v2d->mask.ymin, v2d->mask.xmin + category_tabs_width, v2d->mask.ymax);
+ GPURecti(v2d->mask.xmin, v2d->mask.ymin, v2d->mask.xmin + category_tabs_width, v2d->mask.ymax);
if (is_alpha) {
glDisable(GL_BLEND);
@@ -1773,7 +1773,7 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
/* tab blackline */
if (!is_active) {
glColor3ubv(theme_col_tab_divider);
- glRecti(v2d->mask.xmin + category_tabs_width - px,
+ GPURecti(v2d->mask.xmin + category_tabs_width - px,
rct->ymin - tab_v_pad,
v2d->mask.xmin + category_tabs_width,
rct->ymax + tab_v_pad);
@@ -1799,14 +1799,14 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
/* tab blackline remaining (last tab) */
if (pc_dyn->prev == NULL) {
glColor3ubv(theme_col_tab_divider);
- glRecti(v2d->mask.xmin + category_tabs_width - px,
+ GPURecti(v2d->mask.xmin + category_tabs_width - px,
rct->ymax + px,
v2d->mask.xmin + category_tabs_width,
v2d->mask.ymax);
}
if (pc_dyn->next == NULL) {
glColor3ubv(theme_col_tab_divider);
- glRecti(v2d->mask.xmin + category_tabs_width - px,
+ GPURecti(v2d->mask.xmin + category_tabs_width - px,
0,
v2d->mask.xmin + category_tabs_width,
rct->ymin);
@@ -1816,7 +1816,7 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
/* draw line between inactive tabs */
if (is_active == false && is_active_prev == false && pc_dyn->prev) {
glColor3ubv(theme_col_tab_divider);
- glRecti(v2d->mask.xmin + (category_tabs_width / 5),
+ GPURecti(v2d->mask.xmin + (category_tabs_width / 5),
rct->ymax + px,
(v2d->mask.xmin + category_tabs_width) - (category_tabs_width / 5),
rct->ymax + (px * 3));
diff --git a/sourc
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list