Blender V4.3
blender::draw::image_engine::TextureInfo Struct Reference

#include <image_texture_info.hh>

Public Member Functions

 ~TextureInfo ()
 
int2 offset () const
 return the offset of the texture with the area.
 
void ensure_gpu_texture (int2 texture_size)
 

Public Attributes

bool need_full_update: 1
 does this texture need a full update.
 
rcti clipping_bounds
 area of the texture in screen space.
 
rctf clipping_uv_bounds
 uv area of the texture in screen space.
 
int2 tile_id
 
gpu::Batch * batch = nullptr
 Batch to draw the associated text on the screen.
 
GPUTexture * texture = nullptr
 GPU Texture for a partial region of the image editor.
 
int2 last_texture_size = int2(0)
 

Detailed Description

Definition at line 19 of file image_texture_info.hh.

Constructor & Destructor Documentation

◆ ~TextureInfo()

blender::draw::image_engine::TextureInfo::~TextureInfo ( )
inline

Definition at line 52 of file image_texture_info.hh.

References batch, GPU_batch_discard(), and GPU_texture_free().

Member Function Documentation

◆ ensure_gpu_texture()

void blender::draw::image_engine::TextureInfo::ensure_gpu_texture ( int2 texture_size)
inline

◆ offset()

int2 blender::draw::image_engine::TextureInfo::offset ( ) const
inline

return the offset of the texture with the area.

A texture covers only a part of the area. The offset if the offset in screen coordinates between the area and the part that the texture covers.

Definition at line 71 of file image_texture_info.hh.

References clipping_bounds, rcti::xmin, and rcti::ymin.

Member Data Documentation

◆ batch

gpu::Batch* blender::draw::image_engine::TextureInfo::batch = nullptr

Batch to draw the associated text on the screen.

Contains a VBO with pos and uv. pos (2xI32) is relative to the origin of the space. uv (2xF32) reflect the uv bounds.

Definition at line 43 of file image_texture_info.hh.

Referenced by ~TextureInfo().

◆ clipping_bounds

rcti blender::draw::image_engine::TextureInfo::clipping_bounds

◆ clipping_uv_bounds

rctf blender::draw::image_engine::TextureInfo::clipping_uv_bounds

uv area of the texture in screen space.

Definition at line 30 of file image_texture_info.hh.

Referenced by blender::draw::image_engine::OneTexture::update_bounds().

◆ last_texture_size

int2 blender::draw::image_engine::TextureInfo::last_texture_size = int2(0)

Definition at line 50 of file image_texture_info.hh.

Referenced by ensure_gpu_texture().

◆ need_full_update

bool blender::draw::image_engine::TextureInfo::need_full_update

does this texture need a full update.

When set to false the texture can be updated using a partial update.

Definition at line 25 of file image_texture_info.hh.

Referenced by ensure_gpu_texture(), and blender::draw::image_engine::OneTexture::update_bounds().

◆ texture

GPUTexture* blender::draw::image_engine::TextureInfo::texture = nullptr

GPU Texture for a partial region of the image editor.

Definition at line 48 of file image_texture_info.hh.

◆ tile_id

int2 blender::draw::image_engine::TextureInfo::tile_id

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