mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
cleanups
This commit is contained in:
parent
a66a1d392e
commit
3278478a60
1 changed files with 3 additions and 9 deletions
|
@ -1170,23 +1170,17 @@ void RenderablePolyVoxEntityItem::getMesh() {
|
|||
auto vertexBuffer = std::make_shared<gpu::Buffer>(vecVertices.size() * sizeof(PolyVox::PositionMaterialNormal),
|
||||
(gpu::Byte*)vecVertices.data());
|
||||
auto vertexBufferPtr = gpu::BufferPointer(vertexBuffer);
|
||||
// if (vertexBufferPtr->getSize() > sizeof(PolyVox::PositionMaterialNormal)) {
|
||||
// vertexBufferSize = vertexBufferPtr->getSize() - sizeof(float) * 4;
|
||||
// normalBufferSize = vertexBufferPtr->getSize() - sizeof(float);
|
||||
// }
|
||||
gpu::BufferView vertexBufferView(vertexBufferPtr, 0,
|
||||
vertexBufferPtr->getSize(),
|
||||
// vertexBufferSize,
|
||||
vertexBufferPtr->getSize(),
|
||||
sizeof(PolyVox::PositionMaterialNormal),
|
||||
gpu::Element(gpu::VEC3, gpu::FLOAT, gpu::RAW));
|
||||
mesh->setVertexBuffer(vertexBufferView);
|
||||
mesh->addAttribute(gpu::Stream::NORMAL,
|
||||
gpu::BufferView(vertexBufferPtr, sizeof(float) * 3,
|
||||
vertexBufferPtr->getSize() ,
|
||||
// normalBufferSize,
|
||||
vertexBufferPtr->getSize() ,
|
||||
sizeof(PolyVox::PositionMaterialNormal),
|
||||
gpu::Element(gpu::VEC3, gpu::FLOAT, gpu::RAW)));
|
||||
entity->setMesh(mesh);
|
||||
entity->setMesh(mesh);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue