26 GPUFrameBuffer *framebuffer_ref_ =
nullptr;
32 float4 color_override(0.0f, 0.0f, 0.0f, 0.0f);
35 if (
state.is_viewport_image_render && !
state.draw_background) {
37 color_override[3] = 1.0f;
39 else if (
state.is_space_image()) {
42 else if (
state.is_space_node()) {
46 else if (!
state.draw_background) {
81 if ((
state.clipping_plane_count != 0) && (
state.rv3d) && (
state.rv3d->clipbb)) {
85 bg_ps_.
shader_set(res.shaders->background_clip_bound.get());
86 bg_ps_.
push_constant(
"ucolor", res.theme.colors.clipping_border);
88 bg_ps_.
draw(res.shapes.cube_solid.get());
92 bg_ps_.
shader_set(res.shaders->background_fill.get());
95 bg_ps_.
bind_texture(
"color_buffer", &res.color_render_tx);
104 framebuffer_ref_ = framebuffer;
105 manager.submit(bg_ps_,
view);
@ TH_BACKGROUND_GRADIENT_RADIAL
@ TH_BACKGROUND_SINGLE_COLOR
@ TH_BACKGROUND_GRADIENT_LINEAR
@ V3D_SHADING_BACKGROUND_VIEWPORT
@ V3D_SHADING_BACKGROUND_WORLD
int UI_GetThemeValue(int colorid)
constexpr const T * data() const
void bind_texture(const char *name, GPUTexture *texture, GPUSamplerState state=sampler_auto)
void draw(gpu::Batch *batch, uint instance_len=-1, uint vertex_len=-1, uint vertex_first=-1, ResourceHandleRange handle={0}, uint custom_id=0)
void state_set(DRWState state, int clip_plane_count=0)
void bind_ubo(const char *name, GPUUniformBuf *buffer)
void framebuffer_set(GPUFrameBuffer **framebuffer)
void push_constant(const char *name, const float &data)
void draw_procedural(GPUPrimType primitive, uint instance_len, uint vertex_len, uint vertex_first=-1, ResourceHandleRange handle={0}, uint custom_id=0)
void shader_set(GPUShader *shader)
void draw_output(Framebuffer &framebuffer, Manager &manager, View &view) final
void begin_sync(Resources &res, const State &state) final
#define DRW_CLIPPING_UBO_SLOT
#define OVERLAY_GLOBALS_SLOT
@ DRW_STATE_BLEND_BACKGROUND
VecBase< float, 4 > float4