Blender V5.0
image_space.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2021 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11struct ARegion;
12struct ImBuf;
13struct Image;
14struct ImageUser;
15struct Main;
16
17namespace blender::image_engine {
18
19struct ShaderParameters;
20
28 public:
29 virtual ~AbstractSpaceAccessor() = default;
30
38 virtual ::Image *get_image(Main *bmain) = 0;
39
45 virtual ImageUser *get_image_user() = 0;
46
55 virtual ImBuf *acquire_image_buffer(::Image *image, void **lock) = 0;
56
60 virtual void release_buffer(::Image *image, ImBuf *image_buffer, void *lock) = 0;
61
68 virtual void get_shader_parameters(ShaderParameters &r_shader_parameters,
69 ImBuf *image_buffer) = 0;
70
72 virtual bool use_tile_drawing() const = 0;
73
78 virtual void init_ss_to_texture_matrix(const ARegion *region,
79 const float image_offset[2],
80 const float image_resolution[2],
81 float r_uv_to_texture[4][4]) const = 0;
82};
83
84} // namespace blender::image_engine
volatile int lock
virtual ImBuf * acquire_image_buffer(::Image *image, void **lock)=0
virtual void release_buffer(::Image *image, ImBuf *image_buffer, void *lock)=0
virtual::Image * get_image(Main *bmain)=0
virtual void get_shader_parameters(ShaderParameters &r_shader_parameters, ImBuf *image_buffer)=0
virtual bool use_tile_drawing() const =0
Is (wrap) repeat option enabled in the space.
virtual void init_ss_to_texture_matrix(const ARegion *region, const float image_offset[2], 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....