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:
authorJeroen Bakker <jeroen@blender.org>2022-01-17 16:34:28 +0300
committerJeroen Bakker <jeroen@blender.org>2022-01-17 16:34:28 +0300
commitedee5a947b7ea3e1324aa334a22c7c9bbf47f5f7 (patch)
treeb8f15e66277700ccdc5d6c8b7c7eb3728f91182f /source/blender/editors/interface
parent8fb2ff458ba579dba08bfdf57d043ad158b5db07 (diff)
Revert "GPUShaderCreateInfo for interface abstraction"
This reverts commit 8fb2ff458ba579dba08bfdf57d043ad158b5db07. Missing some files.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_draw.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index f2fa375aa09..285c82b0fb3 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -57,7 +57,6 @@
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_matrix.h"
-#include "GPU_shader_shared.h"
#include "GPU_state.h"
#include "UI_interface.h"
@@ -1385,16 +1384,10 @@ void ui_draw_but_UNITVEC(uiBut *but,
GPU_matrix_scale_1f(size);
GPUBatch *sphere = GPU_batch_preset_sphere(2);
- struct SimpleLightingData simple_lighting_data;
- copy_v4_fl4(simple_lighting_data.color, diffuse[0], diffuse[1], diffuse[2], 1.0f);
- copy_v3_v3(simple_lighting_data.light, light);
- GPUUniformBuf *ubo = GPU_uniformbuf_create_ex(
- sizeof(struct SimpleLightingData), &simple_lighting_data, __func__);
-
GPU_batch_program_set_builtin(sphere, GPU_SHADER_SIMPLE_LIGHTING);
- GPU_batch_uniformbuf_bind(sphere, "simple_lighting_data", ubo);
+ GPU_batch_uniform_4f(sphere, "color", diffuse[0], diffuse[1], diffuse[2], 1.0f);
+ GPU_batch_uniform_3fv(sphere, "light", light);
GPU_batch_draw(sphere);
- GPU_uniformbuf_free(ubo);
/* Restore. */
GPU_face_culling(GPU_CULL_NONE);