mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:10:25 +02:00
maybe?
This commit is contained in:
parent
eb383b1d09
commit
7dff015585
1 changed files with 7 additions and 3 deletions
|
@ -242,9 +242,13 @@ ModelMeshPartPayload::ModelMeshPartPayload(ModelPointer model, int meshIndex, in
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
// On mac AMD, we specifically need to have a _meshBlendshapeBuffer bound when using a deformed mesh pipeline
|
// On mac AMD, we specifically need to have a _meshBlendshapeBuffer bound when using a deformed mesh pipeline
|
||||||
// it cannot be null otherwise we crash in the drawcall using a deformed pipeline with a skinned only (not blendshaped) mesh
|
// it cannot be null otherwise we crash in the drawcall using a deformed pipeline with a skinned only (not blendshaped) mesh
|
||||||
if ((_isBlendShaped || _isSkinned)) {
|
if (_isBlendShaped) {
|
||||||
glm::vec4 data;
|
std::vector<BlendshapeOffset> data(_meshNumVertices);
|
||||||
_meshBlendshapeBuffer = std::make_shared<gpu::Buffer>(sizeof(glm::vec4), reinterpret_cast<const gpu::Byte*>(&data));
|
const auto blendShapeBufferSize = _meshNumVertices * sizeof(BlendshapeOffset);
|
||||||
|
_meshBlendshapeBuffer = std::make_shared<gpu::Buffer>(blendShapeBufferSize, reinterpret_cast<const gpu::Byte*>(data.data()), blendShapeBufferSize);
|
||||||
|
} else if (_isSkinned) {
|
||||||
|
BlendshapeOffset data;
|
||||||
|
_meshBlendshapeBuffer = std::make_shared<gpu::Buffer>(sizeof(BlendshapeOffset), reinterpret_cast<const gpu::Byte*>(&data), sizeof(BlendshapeOffset));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue