Blender V4.3
blender::draw::command::PushConstant Struct Reference

#include <draw_command.hh>

Public Types

enum class  Type : uint8_t { IntValue = 0 , FloatValue , IntReference , FloatReference }
 

Public Member Functions

 PushConstant ()=default
 
 PushConstant (int loc, const float &val)
 
 PushConstant (int loc, const float2 &val)
 
 PushConstant (int loc, const float3 &val)
 
 PushConstant (int loc, const float4 &val)
 
 PushConstant (int loc, const int &val)
 
 PushConstant (int loc, const int2 &val)
 
 PushConstant (int loc, const int3 &val)
 
 PushConstant (int loc, const int4 &val)
 
 PushConstant (int loc, const float *val, int arr)
 
 PushConstant (int loc, const float2 *val, int arr)
 
 PushConstant (int loc, const float3 *val, int arr)
 
 PushConstant (int loc, const float4 *val, int arr)
 
 PushConstant (int loc, const float4x4 *val)
 
 PushConstant (int loc, const int *val, int arr)
 
 PushConstant (int loc, const int2 *val, int arr)
 
 PushConstant (int loc, const int3 *val, int arr)
 
 PushConstant (int loc, const int4 *val, int arr)
 
Commands Execution
void execute (RecordingState &state) const
 
Commands Serialization for debugging
std::string serialize () const
 

Public Attributes

int location
 
uint8_t array_len
 
uint8_t comp_len
 
enum blender::draw::command::PushConstant::Type type
 
union { 
 
   int   int1_value 
 
   int2   int2_value 
 
   int3   int3_value 
 
   int4   int4_value 
 
   float   float1_value 
 
   float2   float2_value 
 
   float3   float3_value 
 
   float4   float4_value 
 
   const int *   int_ref 
 
   const int2 *   int2_ref 
 
   const int3 *   int3_ref 
 
   const int4 *   int4_ref 
 
   const float *   float_ref 
 
   const float2 *   float2_ref 
 
   const float3 *   float3_ref 
 
   const float4 *   float4_ref 
 
   const float4x4 *   float4x4_ref 
 
};  
 

Detailed Description

Definition at line 220 of file draw_command.hh.

Member Enumeration Documentation

◆ Type

Enumerator
IntValue 
FloatValue 
IntReference 
FloatReference 

Definition at line 224 of file draw_command.hh.

Constructor & Destructor Documentation

◆ PushConstant() [1/18]

blender::draw::command::PushConstant::PushConstant ( )
default

◆ PushConstant() [2/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const float & val )
inline

Definition at line 258 of file draw_command.hh.

◆ PushConstant() [3/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const float2 & val )
inline

Definition at line 260 of file draw_command.hh.

◆ PushConstant() [4/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const float3 & val )
inline

Definition at line 262 of file draw_command.hh.

◆ PushConstant() [5/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const float4 & val )
inline

Definition at line 264 of file draw_command.hh.

◆ PushConstant() [6/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const int & val )
inline

Definition at line 267 of file draw_command.hh.

◆ PushConstant() [7/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const int2 & val )
inline

Definition at line 269 of file draw_command.hh.

◆ PushConstant() [8/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const int3 & val )
inline

Definition at line 271 of file draw_command.hh.

◆ PushConstant() [9/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const int4 & val )
inline

Definition at line 273 of file draw_command.hh.

◆ PushConstant() [10/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const float * val,
int arr )
inline

Definition at line 276 of file draw_command.hh.

◆ PushConstant() [11/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const float2 * val,
int arr )
inline

Definition at line 278 of file draw_command.hh.

◆ PushConstant() [12/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const float3 * val,
int arr )
inline

Definition at line 280 of file draw_command.hh.

◆ PushConstant() [13/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const float4 * val,
int arr )
inline

Definition at line 282 of file draw_command.hh.

◆ PushConstant() [14/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const float4x4 * val )
inline

Definition at line 284 of file draw_command.hh.

◆ PushConstant() [15/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const int * val,
int arr )
inline

Definition at line 287 of file draw_command.hh.

◆ PushConstant() [16/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const int2 * val,
int arr )
inline

Definition at line 289 of file draw_command.hh.

◆ PushConstant() [17/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const int3 * val,
int arr )
inline

Definition at line 291 of file draw_command.hh.

◆ PushConstant() [18/18]

blender::draw::command::PushConstant::PushConstant ( int loc,
const int4 * val,
int arr )
inline

Definition at line 293 of file draw_command.hh.

Member Function Documentation

◆ execute()

void blender::draw::command::PushConstant::execute ( RecordingState & state) const

◆ serialize()

Member Data Documentation

◆ [union]

IMPORTANT: Data is at the end of the struct as it can span over the next commands. These next commands are not real commands but just memory to hold the data and are not referenced by any Command::Header. This is a hack to support float4x4 copy.

◆ array_len

uint8_t blender::draw::command::PushConstant::array_len

◆ comp_len

uint8_t blender::draw::command::PushConstant::comp_len

◆ float1_value

float blender::draw::command::PushConstant::float1_value

Definition at line 241 of file draw_command.hh.

Referenced by serialize().

◆ float2_ref

const float2* blender::draw::command::PushConstant::float2_ref

Definition at line 250 of file draw_command.hh.

Referenced by serialize().

◆ float2_value

float2 blender::draw::command::PushConstant::float2_value

Definition at line 242 of file draw_command.hh.

Referenced by serialize().

◆ float3_ref

const float3* blender::draw::command::PushConstant::float3_ref

Definition at line 251 of file draw_command.hh.

Referenced by serialize().

◆ float3_value

float3 blender::draw::command::PushConstant::float3_value

Definition at line 243 of file draw_command.hh.

Referenced by serialize().

◆ float4_ref

const float4* blender::draw::command::PushConstant::float4_ref

Definition at line 252 of file draw_command.hh.

Referenced by serialize().

◆ float4_value

float4 blender::draw::command::PushConstant::float4_value

◆ float4x4_ref

const float4x4* blender::draw::command::PushConstant::float4x4_ref

Definition at line 253 of file draw_command.hh.

Referenced by serialize().

◆ float_ref

const float* blender::draw::command::PushConstant::float_ref

Definition at line 249 of file draw_command.hh.

Referenced by execute(), and serialize().

◆ int1_value

int blender::draw::command::PushConstant::int1_value

Definition at line 237 of file draw_command.hh.

Referenced by serialize().

◆ int2_ref

const int2* blender::draw::command::PushConstant::int2_ref

Definition at line 246 of file draw_command.hh.

Referenced by serialize().

◆ int2_value

int2 blender::draw::command::PushConstant::int2_value

Definition at line 238 of file draw_command.hh.

Referenced by serialize().

◆ int3_ref

const int3* blender::draw::command::PushConstant::int3_ref

Definition at line 247 of file draw_command.hh.

Referenced by serialize().

◆ int3_value

int3 blender::draw::command::PushConstant::int3_value

Definition at line 239 of file draw_command.hh.

Referenced by serialize().

◆ int4_ref

const int4* blender::draw::command::PushConstant::int4_ref

Definition at line 248 of file draw_command.hh.

Referenced by serialize().

◆ int4_value

int4 blender::draw::command::PushConstant::int4_value

Definition at line 240 of file draw_command.hh.

Referenced by execute(), and serialize().

◆ int_ref

const int* blender::draw::command::PushConstant::int_ref

Definition at line 245 of file draw_command.hh.

Referenced by execute(), and serialize().

◆ location

int blender::draw::command::PushConstant::location

◆ type


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