Blender  V3.3
image_private.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2020 Blender Foundation. */
3 
8 #pragma once
9 
10 #include <optional>
11 
12 #include "BKE_image.h"
13 
14 #include "image_instance_data.hh"
15 #include "image_texture_info.hh"
16 
17 /* Forward declarations */
18 extern "C" {
19 struct GPUTexture;
20 struct ImBuf;
21 struct Image;
22 }
23 
24 /* *********** LISTS *********** */
25 
27 
28 struct IMAGE_Data {
29  void *engine_type;
35 };
36 
37 /* Shader parameters. */
38 #define IMAGE_DRAW_FLAG_SHOW_ALPHA (1 << 0)
39 #define IMAGE_DRAW_FLAG_APPLY_ALPHA (1 << 1)
40 #define IMAGE_DRAW_FLAG_SHUFFLING (1 << 2)
41 #define IMAGE_DRAW_FLAG_DEPTH (1 << 3)
42 
50  public:
51  virtual ~AbstractDrawingMode() = default;
52  virtual void cache_init(IMAGE_Data *vedata) const = 0;
53  virtual void cache_image(IMAGE_Data *vedata, Image *image, ImageUser *iuser) const = 0;
54  virtual void draw_scene(IMAGE_Data *vedata) const = 0;
55  virtual void draw_finish(IMAGE_Data *vedata) const = 0;
56 };
57 
58 /* image_shader.c */
59 
62 void IMAGE_shader_free();
63 
64 } // namespace blender::draw::image_engine
char DRWViewportEmptyList
Definition: DRW_render.h:90
struct GPUShader GPUShader
Definition: GPU_shader.h:20
struct GPUTexture GPUTexture
Definition: GPU_texture.h:17
virtual void draw_scene(IMAGE_Data *vedata) const =0
virtual void cache_image(IMAGE_Data *vedata, Image *image, ImageUser *iuser) const =0
virtual void draw_finish(IMAGE_Data *vedata) const =0
virtual void cache_init(IMAGE_Data *vedata) const =0
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
GPUShader * IMAGE_shader_image_get()
Definition: image_shader.cc:28
GPUShader * IMAGE_shader_depth_get()
Definition: image_shader.cc:37