Blender V5.3
ObjectAttribute Struct Reference

#include <draw_shader_shared.hh>

Public Member Functions

ObjectAttributes
bool sync (const draw::ObjectRef &ref, const GPUUniformAttr &attr, int instance_index)
bool sync (const draw::ObjectRef &ref, const char *name, bool use_dupli, int instance_index)

Public Attributes

float data_x
float data_y
float data_z
float data_w
uint hash_code

Detailed Description

Definition at line 614 of file draw_shader_shared.hh.

Member Function Documentation

◆ sync() [1/2]

bool ObjectAttribute::sync ( const draw::ObjectRef & ref,
const char * name,
bool use_dupli,
int instance_index )

Definition at line 31 of file draw_resource.cc.

References blender::BLI_ghashutil_strhash_p(), data_x, hash_code, and instance_index.

◆ sync() [2/2]

bool ObjectAttribute::sync ( const draw::ObjectRef & ref,
const GPUUniformAttr & attr,
int instance_index )

Go through all possible source of the given object uniform attribute. Returns true if the attribute was correctly filled.

Parameters
instance_indexThe index of synced the instance within the ObjectRef::duplis_, or just 0 if the ObjectRef doesn't contain any instances.

Definition at line 22 of file draw_resource.cc.

References data_x, hash_code, and instance_index.

Referenced by blender::draw::Manager::extract_all_object_attributes(), blender::draw::Manager::extract_object_attributes(), and blender::draw::Manager::extract_object_attributes().

Member Data Documentation

◆ data_w

float ObjectAttribute::data_w

Definition at line 620 of file draw_shader_shared.hh.

Referenced by draw::Attributes::get().

◆ data_x

float ObjectAttribute::data_x

Definition at line 617 of file draw_shader_shared.hh.

Referenced by draw::Attributes::get(), sync(), and sync().

◆ data_y

float ObjectAttribute::data_y

Definition at line 618 of file draw_shader_shared.hh.

Referenced by draw::Attributes::get().

◆ data_z

float ObjectAttribute::data_z

Definition at line 619 of file draw_shader_shared.hh.

Referenced by draw::Attributes::get().

◆ hash_code

uint ObjectAttribute::hash_code

Definition at line 621 of file draw_shader_shared.hh.

Referenced by draw::Attributes::get(), sync(), and sync().


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