Blender  V3.3
Public Member Functions | List of all members
AbstractSpaceAccessor Class Referenceabstract

#include <image_space.hh>

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

Public Member Functions

virtual ~AbstractSpaceAccessor ()=default
 
virtual Imageget_image (Main *bmain)=0
 
virtual ImageUserget_image_user ()=0
 
virtual ImBufacquire_image_buffer (Image *image, void **lock)=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 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 bool use_tile_drawing () const =0
 Is (wrap) repeat option enabled in the space. More...
 
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..1) to texture space UV coordinates. More...
 

Detailed Description

Space accessor.

Image engine is used to draw the images inside multiple spaces

See also
SpaceLink. The AbstractSpaceAccessor is an interface to communicate with a space.

Definition at line 18 of file image_space.hh.

Constructor & Destructor Documentation

◆ ~AbstractSpaceAccessor()

virtual AbstractSpaceAccessor::~AbstractSpaceAccessor ( )
virtualdefault

Member Function Documentation

◆ acquire_image_buffer()

virtual ImBuf* AbstractSpaceAccessor::acquire_image_buffer ( Image image,
void **  lock 
)
pure virtual

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.

Implemented in blender::draw::image_engine::SpaceNodeAccessor.

◆ get_gpu_textures()

virtual void AbstractSpaceAccessor::get_gpu_textures ( Image image,
ImageUser iuser,
ImBuf image_buffer,
GPUTexture **  r_gpu_texture,
bool r_owns_texture,
GPUTexture **  r_tex_tile_data 
)
pure virtual

◆ get_image()

virtual Image* AbstractSpaceAccessor::get_image ( Main bmain)
pure virtual

Return the active image of the space.

The returned image will be drawn in the space.

The return value is optional.

Implemented in blender::draw::image_engine::SpaceNodeAccessor.

◆ get_image_user()

virtual ImageUser* AbstractSpaceAccessor::get_image_user ( )
pure virtual

Return the ImageUser of the space.

The return value is optional.

Implemented in blender::draw::image_engine::SpaceNodeAccessor, and blender::draw::image_engine::SpaceImageAccessor.

◆ get_shader_parameters()

virtual void AbstractSpaceAccessor::get_shader_parameters ( ShaderParameters r_shader_parameters,
ImBuf image_buffer 
)
pure virtual

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.

Implemented in blender::draw::image_engine::SpaceImageAccessor, and blender::draw::image_engine::SpaceNodeAccessor.

Referenced by ShaderParameters::update().

◆ init_ss_to_texture_matrix()

virtual void AbstractSpaceAccessor::init_ss_to_texture_matrix ( const ARegion region,
const float  image_resolution[2],
float  r_uv_to_texture[4][4] 
) const
pure virtual

Initialize r_uv_to_texture matrix to transform from normalized screen space coordinates (0..1) to texture space UV coordinates.

Implemented in blender::draw::image_engine::SpaceNodeAccessor.

◆ release_buffer()

virtual void AbstractSpaceAccessor::release_buffer ( Image image,
ImBuf image_buffer,
void lock 
)
pure virtual

Release a previous locked image from acquire_image_buffer.

Implemented in blender::draw::image_engine::SpaceNodeAccessor.

◆ use_tile_drawing()

virtual bool AbstractSpaceAccessor::use_tile_drawing ( ) const
pure virtual

Is (wrap) repeat option enabled in the space.

Implemented in blender::draw::image_engine::SpaceNodeAccessor, and blender::draw::image_engine::SpaceImageAccessor.


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