mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:39:26 +02:00
fixing warnings
This commit is contained in:
parent
e8d922a56c
commit
761e8a3f95
2 changed files with 6 additions and 4 deletions
|
@ -585,7 +585,7 @@ void FBXReader::buildModelMesh(FBXMesh& extractedMesh, const QString& url) {
|
||||||
|
|
||||||
FBXMesh& fbxMesh = extractedMesh;
|
FBXMesh& fbxMesh = extractedMesh;
|
||||||
graphics::MeshPointer mesh(new graphics::Mesh());
|
graphics::MeshPointer mesh(new graphics::Mesh());
|
||||||
bool blendShapes = !fbxMesh.blendshapes.empty();
|
// bool blendShapes = !fbxMesh.blendshapes.empty();
|
||||||
int numVerts = extractedMesh.vertices.size();
|
int numVerts = extractedMesh.vertices.size();
|
||||||
|
|
||||||
// Grab the vertices in a buffer
|
// Grab the vertices in a buffer
|
||||||
|
@ -619,7 +619,7 @@ void FBXReader::buildModelMesh(FBXMesh& extractedMesh, const QString& url) {
|
||||||
qWarning() << "Unexpected tangents in " << url;
|
qWarning() << "Unexpected tangents in " << url;
|
||||||
}
|
}
|
||||||
const auto normalsAndTangentsSize = normalsSize + tangentsSize;
|
const auto normalsAndTangentsSize = normalsSize + tangentsSize;
|
||||||
const int normalsAndTangentsStride = 2 * sizeof(NormalType);
|
// const int normalsAndTangentsStride = 2 * sizeof(NormalType);
|
||||||
const int colorsSize = fbxMesh.colors.size() * sizeof(ColorType);
|
const int colorsSize = fbxMesh.colors.size() * sizeof(ColorType);
|
||||||
// Texture coordinates are stored in 2 half floats
|
// Texture coordinates are stored in 2 half floats
|
||||||
const int texCoordsSize = fbxMesh.texCoords.size() * sizeof(vec2h);
|
const int texCoordsSize = fbxMesh.texCoords.size() * sizeof(vec2h);
|
||||||
|
@ -635,7 +635,7 @@ void FBXReader::buildModelMesh(FBXMesh& extractedMesh, const QString& url) {
|
||||||
|
|
||||||
// Normals and tangents are interleaved
|
// Normals and tangents are interleaved
|
||||||
const int normalsOffset = 0;
|
const int normalsOffset = 0;
|
||||||
const int tangentsOffset = normalsOffset + sizeof(NormalType);
|
// const int tangentsOffset = normalsOffset + sizeof(NormalType);
|
||||||
const int totalNTSize = normalsOffset + normalsSize + tangentsSize;
|
const int totalNTSize = normalsOffset + normalsSize + tangentsSize;
|
||||||
//const int colorsOffset = normalsOffset + normalsSize + tangentsSize;
|
//const int colorsOffset = normalsOffset + normalsSize + tangentsSize;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,9 @@ void Mesh::setVertexFormatAndStream(const gpu::Stream::FormatPointer& vf, const
|
||||||
_vertexFormat = vf;
|
_vertexFormat = vf;
|
||||||
_vertexStream = (*vbs);
|
_vertexStream = (*vbs);
|
||||||
|
|
||||||
_vertexBuffer = BufferView(vbs->getBuffers()[0], vbs->getOffsets()[0], vbs->getBuffers()[0]->getSize(), vbs->getStrides()[0], gpu::Element(gpu::VEC3, gpu::FLOAT, gpu::XYZ));
|
auto attrib = _vertexFormat->getAttribute(gpu::Stream::POSITION);
|
||||||
|
_vertexBuffer = BufferView(vbs->getBuffers()[attrib._channel], vbs->getOffsets()[attrib._channel], vbs->getBuffers()[attrib._channel]->getSize(),
|
||||||
|
(gpu::uint16) vbs->getStrides()[attrib._channel], attrib._element);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mesh::setVertexBuffer(const BufferView& buffer) {
|
void Mesh::setVertexBuffer(const BufferView& buffer) {
|
||||||
|
|
Loading…
Reference in a new issue