Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction to index buffer type in loadMeshBVH #5

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/runtimerender/resourcemanager/qssgrenderbuffermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ std::unique_ptr<QSSGMeshBVH> QSSGBufferManager::loadMeshBVH(QSSGRenderGeometry *

// Build BVH
bool hasIndexBuffer = false;
QSSGRenderComponentType indexBufferFormat = QSSGRenderComponentType::Int32;
QSSGRenderComponentType indexBufferFormat = QSSGRenderComponentType::UnsignedInt32;
bool hasUV = false;
int uvOffset = -1;
int posOffset = -1;
Expand All @@ -1795,10 +1795,10 @@ std::unique_ptr<QSSGMeshBVH> QSSGBufferManager::loadMeshBVH(QSSGRenderGeometry *
uvOffset = attribute.offset;
} else if (attribute.semantic == QSSGMesh::RuntimeMeshData::Attribute::IndexSemantic) {
hasIndexBuffer = true;
if (attribute.componentType == QSSGMesh::Mesh::ComponentType::Int16)
indexBufferFormat = QSSGRenderComponentType::Int16;
else if (attribute.componentType == QSSGMesh::Mesh::ComponentType::Int32)
indexBufferFormat = QSSGRenderComponentType::Int32;
if (attribute.componentType == QSSGMesh::Mesh::ComponentType::UnsignedInt16)
indexBufferFormat = QSSGRenderComponentType::UnsignedInt16;
else if (attribute.componentType == QSSGMesh::Mesh::ComponentType::UnsignedInt32)
indexBufferFormat = QSSGRenderComponentType::UnsignedInt32;
}
}

Expand Down