Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-07-16 03:06:25 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-07-16 19:01:44 +0300
commitab19abe22315f2e2dcce989beef6dcabee528299 (patch)
tree751d0dba4738ed2e6281b94bb12cb68b5f904952 /source/blender/editors
parentbc8508115645f6426431217d1fc78cfe32ce6b23 (diff)
Cleanup: Port glClear calls to GPU module functions
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/gpencil/gpencil_fill.c4
-rw-r--r--source/blender/editors/screen/area.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 8c901da100d..517225e5a81 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -398,8 +398,8 @@ static bool gpencil_render_offscreen(tGPDfill *tgpf)
GPU_matrix_push();
GPU_matrix_identity_set();
- glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ GPU_clear_color(0.0f, 0.0f, 0.0f, 0.0f);
+ GPU_clear(GPU_COLOR_BIT | GPU_DEPTH_BIT);
ED_view3d_update_viewmat(
tgpf->depsgraph, tgpf->scene, tgpf->v3d, tgpf->region, NULL, winmat, NULL, true);
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 3415e21c9e0..d8859ec8532 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -357,12 +357,12 @@ static void region_draw_status_text(ScrArea *area, ARegion *region)
bool overlap = ED_region_is_overlap(area->spacetype, region->regiontype);
if (overlap) {
- GPU_clear_color(0.0, 0.0, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
+ GPU_clear_color(0.0f, 0.0f, 0.0f, 0.0f);
+ GPU_clear(GPU_COLOR_BIT);
}
else {
UI_ThemeClearColor(TH_HEADER);
- glClear(GL_COLOR_BUFFER_BIT);
+ GPU_clear(GPU_COLOR_BIT);
}
int fontid = BLF_set_default();
@@ -527,7 +527,7 @@ void ED_region_do_draw(bContext *C, ARegion *region)
if (area && area_is_pseudo_minimized(area)) {
UI_ThemeClearColor(TH_EDITOR_OUTLINE);
- glClear(GL_COLOR_BUFFER_BIT);
+ GPU_clear(GPU_COLOR_BIT);
return;
}
/* optional header info instead? */