Blender V5.0
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 232 of file draw_command.hh.

Member Enumeration Documentation

◆ Type

enum class blender::draw::command::PushConstant::Type : uint8_t
strong
Enumerator
IntValue 
FloatValue 
IntReference 
FloatReference 

Definition at line 236 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 270 of file draw_command.hh.

References array_len, comp_len, float1_value, location, and type.

◆ PushConstant() [3/18]

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

Definition at line 272 of file draw_command.hh.

References array_len, comp_len, float2_value, location, and type.

◆ PushConstant() [4/18]

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

Definition at line 274 of file draw_command.hh.

References array_len, comp_len, float3_value, location, and type.

◆ PushConstant() [5/18]

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

Definition at line 276 of file draw_command.hh.

References array_len, comp_len, float4_value, location, and type.

◆ PushConstant() [6/18]

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

Definition at line 279 of file draw_command.hh.

References array_len, comp_len, int1_value, location, and type.

◆ PushConstant() [7/18]

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

Definition at line 281 of file draw_command.hh.

References array_len, comp_len, int2_value, location, and type.

◆ PushConstant() [8/18]

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

Definition at line 283 of file draw_command.hh.

References array_len, comp_len, int3_value, location, and type.

◆ PushConstant() [9/18]

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

Definition at line 285 of file draw_command.hh.

References array_len, comp_len, int4_value, location, and type.

◆ PushConstant() [10/18]

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

Definition at line 288 of file draw_command.hh.

References array_len, comp_len, float_ref, location, and type.

◆ PushConstant() [11/18]

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

Definition at line 290 of file draw_command.hh.

References array_len, comp_len, float2_ref, location, and type.

◆ PushConstant() [12/18]

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

Definition at line 292 of file draw_command.hh.

References array_len, comp_len, float3_ref, location, and type.

◆ PushConstant() [13/18]

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

Definition at line 294 of file draw_command.hh.

References array_len, comp_len, float4_ref, location, and type.

◆ PushConstant() [14/18]

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

Definition at line 296 of file draw_command.hh.

References array_len, comp_len, float4x4_ref, location, and type.

◆ PushConstant() [15/18]

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

Definition at line 300 of file draw_command.hh.

References array_len, comp_len, int_ref, location, and type.

◆ PushConstant() [16/18]

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

Definition at line 302 of file draw_command.hh.

References array_len, comp_len, int2_ref, location, and type.

◆ PushConstant() [17/18]

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

Definition at line 304 of file draw_command.hh.

References array_len, comp_len, int3_ref, location, and type.

◆ PushConstant() [18/18]

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

Definition at line 306 of file draw_command.hh.

References array_len, comp_len, int4_ref, location, and type.

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

◆ comp_len

◆ float1_value

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

Definition at line 253 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ float2_ref

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

Definition at line 262 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ float2_value

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

Definition at line 254 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ float3_ref

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

Definition at line 263 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ float3_value

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

Definition at line 255 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ float4_ref

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

Definition at line 264 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ float4_value

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

◆ float4x4_ref

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

Definition at line 265 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ float_ref

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

Definition at line 261 of file draw_command.hh.

Referenced by execute(), PushConstant(), and serialize().

◆ int1_value

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

Definition at line 249 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ int2_ref

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

Definition at line 258 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ int2_value

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

Definition at line 250 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ int3_ref

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

Definition at line 259 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ int3_value

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

Definition at line 251 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ int4_ref

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

Definition at line 260 of file draw_command.hh.

Referenced by PushConstant(), and serialize().

◆ int4_value

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

Definition at line 252 of file draw_command.hh.

Referenced by execute(), PushConstant(), and serialize().

◆ int_ref

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

Definition at line 257 of file draw_command.hh.

Referenced by execute(), PushConstant(), and serialize().

◆ location

◆ type


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