Blender V5.0
blender::ocio::internal::GPUCurveMappping Class Reference

#include <gpu_shader_binder_internal.hh>

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

Public Member Functions

GPUTextures
 ~GPUCurveMappping ()
void rasterize (CurveMapping &curve_mapping)
bool initialize_common (bool use_curve_mapping)

Public Attributes

int lut_size = 0
floatlut = nullptr
gpu::UniformBufbuffer = nullptr
blender::gpu::Texturetexture = nullptr
size_t cache_id = 0

Detailed Description

Definition at line 97 of file gpu_shader_binder_internal.hh.

Constructor & Destructor Documentation

◆ ~GPUCurveMappping()

blender::ocio::internal::GPUCurveMappping::~GPUCurveMappping ( )

Definition at line 66 of file gpu_shader_binder.cc.

References lut, MEM_freeN(), and texture.

Member Function Documentation

◆ initialize_common()

bool blender::ocio::internal::GPUCurveMappping::initialize_common ( bool use_curve_mapping)

Initialize common parts of this object: resources needed for both fall-back and OpenColorIO implementations.

Requires rasterization to happen prior to this call.

Returns true if the resources have been successfully allocated.

Definition at line 91 of file gpu_shader_binder.cc.

References buffer, GPU_SAMPLER_EXTEND_MODE_EXTEND, GPU_texture_create_1d(), GPU_texture_extend_mode(), GPU_texture_filter_mode(), GPU_TEXTURE_USAGE_SHADER_READ, GPU_uniformbuf_create, lut_size, and texture.

◆ rasterize()

void blender::ocio::internal::GPUCurveMappping::rasterize ( CurveMapping & curve_mapping)

Rasterize given curve mapping into a lookup table.

Definition at line 80 of file gpu_shader_binder.cc.

References BKE_curvemapping_init(), BKE_curvemapping_premultiply(), BKE_curvemapping_table_RGBA(), lut, lut_size, and MEM_freeN().

Referenced by blender::ocio::GPUShaderBinder::display_bind().

Member Data Documentation

◆ buffer

gpu::UniformBuf* blender::ocio::internal::GPUCurveMappping::buffer = nullptr

Definition at line 102 of file gpu_shader_binder_internal.hh.

Referenced by initialize_common().

◆ cache_id

size_t blender::ocio::internal::GPUCurveMappping::cache_id = 0

Definition at line 104 of file gpu_shader_binder_internal.hh.

◆ lut

float* blender::ocio::internal::GPUCurveMappping::lut = nullptr

Definition at line 100 of file gpu_shader_binder_internal.hh.

Referenced by rasterize(), and ~GPUCurveMappping().

◆ lut_size

int blender::ocio::internal::GPUCurveMappping::lut_size = 0

Definition at line 99 of file gpu_shader_binder_internal.hh.

Referenced by initialize_common(), and rasterize().

◆ texture

blender::gpu::Texture* blender::ocio::internal::GPUCurveMappping::texture = nullptr

Definition at line 103 of file gpu_shader_binder_internal.hh.

Referenced by initialize_common(), and ~GPUCurveMappping().


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