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:
Diffstat (limited to 'source/blender/editors/space_node/node_draw.c')
-rw-r--r--source/blender/editors/space_node/node_draw.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 884f551bad1..0a754b6ec2a 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -47,7 +47,6 @@
#include "BIF_glutil.h"
-#include "GPU_batch_presets.h"
#include "GPU_framebuffer.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
@@ -949,9 +948,8 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
draw_rect.ymin,
preview->xsize,
preview->ysize,
- GL_RGBA,
- GL_UNSIGNED_BYTE,
- GL_LINEAR,
+ GPU_RGBA8,
+ true,
preview->rect,
scale,
scale,
@@ -981,23 +979,8 @@ static void node_toggle_button_cb(struct bContext *C, void *node_argv, void *op_
void node_draw_shadow(SpaceNode *snode, bNode *node, float radius, float alpha)
{
rctf *rct = &node->totr;
-
UI_draw_roundbox_corner_set(UI_CNR_ALL);
- if (node->parent == NULL) {
- ui_draw_dropshadow(rct, radius, snode->aspect, alpha, node->flag & SELECT);
- }
- else {
- const float margin = 3.0f;
-
- float color[4] = {0.0f, 0.0f, 0.0f, 0.33f};
- UI_draw_roundbox_aa(true,
- rct->xmin - margin,
- rct->ymin - margin,
- rct->xmax + margin,
- rct->ymax + margin,
- radius + margin,
- color);
- }
+ ui_draw_dropshadow(rct, radius, snode->aspect, alpha, node->flag & SELECT);
}
void node_draw_sockets(View2D *v2d,
@@ -1773,15 +1756,13 @@ void drawnodespace(const bContext *C, ARegion *region)
SpaceNode *snode = CTX_wm_space_node(C);
View2D *v2d = &region->v2d;
- UI_view2d_view_ortho(v2d);
-
/* Setup offscreen buffers. */
GPUViewport *viewport = WM_draw_region_get_viewport(region);
GPUFrameBuffer *framebuffer_overlay = GPU_viewport_framebuffer_overlay_get(viewport);
GPU_framebuffer_bind_no_srgb(framebuffer_overlay);
- GPU_batch_presets_reset();
+ UI_view2d_view_ortho(v2d);
UI_ThemeClearColor(TH_BACK);
GPU_clear(GPU_COLOR_BIT);