Blender V5.3
blender::GPUTextureUpload Struct Reference

Inherits blender::blender::NonCopyable, and blender::blender::NonMovable.

Public Member Functions

 GPUTextureUpload ()=default
 ~GPUTextureUpload ()
Public Member Functions inherited from blender::blender::NonCopyable
 NonCopyable (const NonCopyable &other)=delete
NonCopyable & operator= (const NonCopyable &other)=delete
 NonCopyable ()=default
 NonCopyable (NonCopyable &&other)=default
NonCopyable & operator= (NonCopyable &&other)=default
Public Member Functions inherited from blender::blender::NonMovable
 NonMovable (NonMovable &&other)=delete
NonMovable & operator= (NonMovable &&other)=delete
 NonMovable ()=default
 NonMovable (const NonMovable &other)=default
NonMovable & operator= (const NonMovable &other)=default

Public Attributes

const void * data = nullptr
eGPUDataFormat format = GPU_DATA_FLOAT
int stride = 0
int2 size = int2(0)
ImBuf * tmp_ibuf = nullptr

Detailed Description

Returns an image buffer containing the data from the source buffer but suitable for uploading to GPU textures. If #scaled_size is not nullopt, the image will be scaled using a box filter to match the scaled size. If #premultiplied_alpha is true and alpha is not packed, alpha is ensured to be premultiplied, otherwise, it is ensured to be straight. If #is_grayscale is true, if the image will be stored as a grayscale image with no data loss, it will be return as so, otherwise, it will be RGBA.

Definition at line 209 of file util_gpu.cc.

Constructor & Destructor Documentation

◆ GPUTextureUpload()

blender::GPUTextureUpload::GPUTextureUpload ( )
default

◆ ~GPUTextureUpload()

blender::GPUTextureUpload::~GPUTextureUpload ( )
inline

Definition at line 217 of file util_gpu.cc.

References blender::IMB_freeImBuf(), and tmp_ibuf.

Member Data Documentation

◆ data

◆ format

◆ size

int2 blender::GPUTextureUpload::size = int2(0)

◆ stride

int blender::GPUTextureUpload::stride = 0

◆ tmp_ibuf

ImBuf* blender::GPUTextureUpload::tmp_ibuf = nullptr

Definition at line 214 of file util_gpu.cc.

Referenced by blender::get_gpu_texture_data(), and ~GPUTextureUpload().


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