Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_shader_shared.h
| Show First 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | |||||
| struct ObjectAttribute { | struct ObjectAttribute { | ||||
| /* Workaround the padding cost from alignment requirements. | /* Workaround the padding cost from alignment requirements. | ||||
| * (see GL spec : 7.6.2.2 Standard Uniform Block Layout) */ | * (see GL spec : 7.6.2.2 Standard Uniform Block Layout) */ | ||||
| float data_x, data_y, data_z, data_w; | float data_x, data_y, data_z, data_w; | ||||
| uint hash_code; | uint hash_code; | ||||
| #if !defined(GPU_SHADER) && defined(__cplusplus) | #if !defined(GPU_SHADER) && defined(__cplusplus) | ||||
| bool sync(const blender::draw::ObjectRef &ref, const GPUUniformAttr &attr); | bool sync(const blender::draw::ObjectRef &ref, const GPUUniformAttr &attr); | ||||
| bool id_property_lookup(ID *id, const char *name); | |||||
| #endif | #endif | ||||
| }; | }; | ||||
| #pragma pack(pop) | #pragma pack(pop) | ||||
| /** \note we only align to 4 bytes and fetch data manually so make sure | /** \note we only align to 4 bytes and fetch data manually so make sure | ||||
| * C++ compiler gives us the same size. */ | * C++ compiler gives us the same size. */ | ||||
| BLI_STATIC_ASSERT_ALIGN(ObjectAttribute, 20) | BLI_STATIC_ASSERT_ALIGN(ObjectAttribute, 20) | ||||
| /** \} */ | /** \} */ | ||||
| ▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines | |||||