|
|
|
@ -179,6 +179,7 @@ template<UnsignedInt dimensions> typename FlatGL<dimensions>::CompileState FlatG |
|
|
|
.addSource(configuration.flags() >= Flag::InstancedTextureOffset ? "#define INSTANCED_TEXTURE_OFFSET\n"_s : ""_s); |
|
|
|
.addSource(configuration.flags() >= Flag::InstancedTextureOffset ? "#define INSTANCED_TEXTURE_OFFSET\n"_s : ""_s); |
|
|
|
#ifndef MAGNUM_TARGET_GLES2 |
|
|
|
#ifndef MAGNUM_TARGET_GLES2 |
|
|
|
if(configuration.perVertexJointCount() || configuration.secondaryPerVertexJointCount()) { |
|
|
|
if(configuration.perVertexJointCount() || configuration.secondaryPerVertexJointCount()) { |
|
|
|
|
|
|
|
if(!(configuration.flags() >= Flag::UniformBuffers)) { |
|
|
|
vert.addSource(Utility::format( |
|
|
|
vert.addSource(Utility::format( |
|
|
|
"#define JOINT_COUNT {}\n" |
|
|
|
"#define JOINT_COUNT {}\n" |
|
|
|
"#define PER_VERTEX_JOINT_COUNT {}u\n" |
|
|
|
"#define PER_VERTEX_JOINT_COUNT {}u\n" |
|
|
|
@ -194,12 +195,25 @@ template<UnsignedInt dimensions> typename FlatGL<dimensions>::CompileState FlatG |
|
|
|
((dimensions == 2 ? "mat3(1.0), "_s : "mat4(1.0), "_s)*configuration.jointCount()).exceptSuffix(2), |
|
|
|
((dimensions == 2 ? "mat3(1.0), "_s : "mat4(1.0), "_s)*configuration.jointCount()).exceptSuffix(2), |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
out._perInstanceJointCountUniform)); |
|
|
|
out._perInstanceJointCountUniform)); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
vert.addSource(Utility::format( |
|
|
|
|
|
|
|
"#define JOINT_COUNT {}\n" |
|
|
|
|
|
|
|
"#define PER_VERTEX_JOINT_COUNT {}u\n" |
|
|
|
|
|
|
|
"#define SECONDARY_PER_VERTEX_JOINT_COUNT {}u\n", |
|
|
|
|
|
|
|
configuration.jointCount(), |
|
|
|
|
|
|
|
configuration.perVertexJointCount(), |
|
|
|
|
|
|
|
configuration.secondaryPerVertexJointCount())); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(configuration.flags() >= Flag::DynamicPerVertexJointCount) { |
|
|
|
if(configuration.flags() >= Flag::DynamicPerVertexJointCount) { |
|
|
|
|
|
|
|
if(!(configuration.flags() >= Flag::UniformBuffers)) { |
|
|
|
vert.addSource(Utility::format( |
|
|
|
vert.addSource(Utility::format( |
|
|
|
"#define DYNAMIC_PER_VERTEX_JOINT_COUNT\n" |
|
|
|
"#define DYNAMIC_PER_VERTEX_JOINT_COUNT\n" |
|
|
|
"#define PER_VERTEX_JOINT_COUNT_LOCATION {}\n", |
|
|
|
"#define PER_VERTEX_JOINT_COUNT_LOCATION {}\n", |
|
|
|
out._perVertexJointCountUniform)); |
|
|
|
out._perVertexJointCountUniform)); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
vert.addSource("#define DYNAMIC_PER_VERTEX_JOINT_COUNT\n"_s); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifndef MAGNUM_TARGET_GLES2 |
|
|
|
#ifndef MAGNUM_TARGET_GLES2 |
|
|
|
|