Blender  V3.3
Public Member Functions | List of all members
blender::draw::image_engine::SpaceNodeAccessor Class Reference

#include <image_space_node.hh>

Inheritance diagram for blender::draw::image_engine::SpaceNodeAccessor:
AbstractSpaceAccessor

Public Member Functions

 SpaceNodeAccessor (SpaceNode *snode)
 
Imageget_image (Main *bmain) override
 
ImageUserget_image_user () override
 
ImBufacquire_image_buffer (Image *image, void **lock) override
 
void release_buffer (Image *image, ImBuf *ibuf, void *lock) override
 
void get_shader_parameters (ShaderParameters &r_shader_parameters, ImBuf *ibuf) override
 
void get_gpu_textures (Image *image, ImageUser *iuser, ImBuf *ibuf, GPUTexture **r_gpu_texture, bool *r_owns_texture, GPUTexture **r_tex_tile_data) override
 
bool use_tile_drawing () const override
 Is (wrap) repeat option enabled in the space. More...
 
void init_ss_to_texture_matrix (const ARegion *region, const float image_resolution[2], float r_uv_to_texture[4][4]) const override
 
- Public Member Functions inherited from AbstractSpaceAccessor
virtual ~AbstractSpaceAccessor ()=default
 

Detailed Description

Definition at line 14 of file image_space_node.hh.

Constructor & Destructor Documentation

◆ SpaceNodeAccessor()

blender::draw::image_engine::SpaceNodeAccessor::SpaceNodeAccessor ( SpaceNode snode)
inline

Definition at line 18 of file image_space_node.hh.

Member Function Documentation

◆ acquire_image_buffer()

ImBuf* blender::draw::image_engine::SpaceNodeAccessor::acquire_image_buffer ( Image image,
void **  lock 
)
inlineoverridevirtual

Acquire the image buffer of the image.

Parameters
imageImage to get the buffer from. Image is the same as returned from the get_image member.
lockpointer to a lock object.
Returns
Image buffer of the given image.

Implements AbstractSpaceAccessor.

Definition at line 32 of file image_space_node.hh.

References BKE_image_acquire_ibuf(), image(), and lock.

◆ get_gpu_textures()

void blender::draw::image_engine::SpaceNodeAccessor::get_gpu_textures ( Image image,
ImageUser iuser,
ImBuf image_buffer,
GPUTexture **  r_gpu_texture,
bool r_owns_texture,
GPUTexture **  r_tex_tile_data 
)
inlineoverridevirtual

Retrieve the gpu textures to draw.

Implements AbstractSpaceAccessor.

Definition at line 80 of file image_space_node.hh.

References BKE_image_get_gpu_texture(), and image().

◆ get_image()

Image* blender::draw::image_engine::SpaceNodeAccessor::get_image ( Main bmain)
inlineoverridevirtual

Return the active image of the space.

The returned image will be drawn in the space.

The return value is optional.

Implements AbstractSpaceAccessor.

Definition at line 22 of file image_space_node.hh.

References BKE_image_ensure_viewer(), and IMA_TYPE_COMPOSITE.

◆ get_image_user()

ImageUser* blender::draw::image_engine::SpaceNodeAccessor::get_image_user ( )
inlineoverridevirtual

Return the ImageUser of the space.

The return value is optional.

Implements AbstractSpaceAccessor.

Definition at line 27 of file image_space_node.hh.

◆ get_shader_parameters()

void blender::draw::image_engine::SpaceNodeAccessor::get_shader_parameters ( ShaderParameters r_shader_parameters,
ImBuf image_buffer 
)
inlineoverridevirtual

Update the r_shader_parameters with space specific settings.

Only update the ShaderParameters.flags and ShaderParameters.shuffle. Other parameters are updated inside the image engine.

Implements AbstractSpaceAccessor.

Definition at line 42 of file image_space_node.hh.

References copy_v4_fl4(), SpaceNode::flag, ShaderParameters::flags, IMAGE_DRAW_FLAG_APPLY_ALPHA, IMAGE_DRAW_FLAG_SHOW_ALPHA, IMAGE_DRAW_FLAG_SHUFFLING, IMB_alpha_affects_rgb(), ShaderParameters::shuffle, SNODE_SHOW_ALPHA, SNODE_SHOW_B, SNODE_SHOW_G, SNODE_SHOW_R, and SNODE_USE_ALPHA.

◆ init_ss_to_texture_matrix()

void blender::draw::image_engine::SpaceNodeAccessor::init_ss_to_texture_matrix ( const ARegion region,
const float  image_resolution[2],
float  r_uv_to_texture[4][4] 
) const
inlineoverridevirtual

The backdrop of the node editor isn't drawn in screen space UV space. But is locked with the screen.

Implements AbstractSpaceAccessor.

Definition at line 101 of file image_space_node.hh.

References mul_v2_v2fl(), unit_m4(), ARegion::winx, ARegion::winy, SpaceNode::xof, SpaceNode::yof, and SpaceNode::zoom.

◆ release_buffer()

void blender::draw::image_engine::SpaceNodeAccessor::release_buffer ( Image image,
ImBuf image_buffer,
void lock 
)
inlineoverridevirtual

Release a previous locked image from acquire_image_buffer.

Implements AbstractSpaceAccessor.

Definition at line 37 of file image_space_node.hh.

References BKE_image_release_ibuf(), image(), and lock.

◆ use_tile_drawing()

bool blender::draw::image_engine::SpaceNodeAccessor::use_tile_drawing ( ) const
inlineoverridevirtual

Is (wrap) repeat option enabled in the space.

Implements AbstractSpaceAccessor.

Definition at line 92 of file image_space_node.hh.


The documentation for this class was generated from the following file: