Blender  V3.3
image_space.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2021 Blender Foundation. */
3 
8 #pragma once
9 
10 struct ShaderParameters;
11 
19  public:
20  virtual ~AbstractSpaceAccessor() = default;
21 
29  virtual Image *get_image(Main *bmain) = 0;
30 
36  virtual ImageUser *get_image_user() = 0;
37 
46  virtual ImBuf *acquire_image_buffer(Image *image, void **lock) = 0;
47 
51  virtual void release_buffer(Image *image, ImBuf *image_buffer, void *lock) = 0;
52 
59  virtual void get_shader_parameters(ShaderParameters &r_shader_parameters,
60  ImBuf *image_buffer) = 0;
61 
65  virtual void get_gpu_textures(Image *image,
66  ImageUser *iuser,
67  ImBuf *image_buffer,
68  GPUTexture **r_gpu_texture,
69  bool *r_owns_texture,
70  GPUTexture **r_tex_tile_data) = 0;
71 
73  virtual bool use_tile_drawing() const = 0;
74 
79  virtual void init_ss_to_texture_matrix(const ARegion *region,
80  const float image_resolution[2],
81  float r_uv_to_texture[4][4]) const = 0;
82 
83 }; // namespace blender::draw::image_engine
struct GPUTexture GPUTexture
Definition: GPU_texture.h:17
volatile int lock
virtual void get_gpu_textures(Image *image, ImageUser *iuser, ImBuf *image_buffer, GPUTexture **r_gpu_texture, bool *r_owns_texture, GPUTexture **r_tex_tile_data)=0
virtual ImageUser * get_image_user()=0
virtual ~AbstractSpaceAccessor()=default
virtual bool use_tile_drawing() const =0
Is (wrap) repeat option enabled in the space.
virtual Image * get_image(Main *bmain)=0
virtual void release_buffer(Image *image, ImBuf *image_buffer, void *lock)=0
virtual void get_shader_parameters(ShaderParameters &r_shader_parameters, ImBuf *image_buffer)=0
virtual ImBuf * acquire_image_buffer(Image *image, void **lock)=0
virtual void init_ss_to_texture_matrix(const ARegion *region, const float image_resolution[2], float r_uv_to_texture[4][4]) const =0
Initialize r_uv_to_texture matrix to transform from normalized screen space coordinates (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
Definition: BKE_main.h:121