mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
cleanups
This commit is contained in:
parent
47ea32f4d3
commit
a1107deef1
2 changed files with 3 additions and 4 deletions
|
@ -152,8 +152,6 @@ model::MeshPointer Mesh::map(std::function<glm::vec3(glm::vec3)> vertexFunc,
|
||||||
}
|
}
|
||||||
|
|
||||||
// color data
|
// color data
|
||||||
// static const gpu::Element COLOR_ELEMENT { gpu::VEC4, gpu::NUINT8, gpu::RGBA };
|
|
||||||
// int attributeTypeColor = gpu::Stream::InputSlot::COLOR; // libraries/gpu/src/gpu/Stream.h
|
|
||||||
int attributeTypeColor = gpu::Stream::COLOR;
|
int attributeTypeColor = gpu::Stream::COLOR;
|
||||||
const gpu::BufferView& colorsBufferView = getAttributeBuffer(attributeTypeColor);
|
const gpu::BufferView& colorsBufferView = getAttributeBuffer(attributeTypeColor);
|
||||||
gpu::BufferView::Index numColors = (gpu::BufferView::Index)colorsBufferView.getNumElements();
|
gpu::BufferView::Index numColors = (gpu::BufferView::Index)colorsBufferView.getNumElements();
|
||||||
|
@ -250,7 +248,6 @@ void Mesh::forEach(std::function<void(glm::vec3)> vertexFunc,
|
||||||
|
|
||||||
// color data
|
// color data
|
||||||
int attributeTypeColor = gpu::Stream::InputSlot::COLOR; // libraries/gpu/src/gpu/Stream.h
|
int attributeTypeColor = gpu::Stream::InputSlot::COLOR; // libraries/gpu/src/gpu/Stream.h
|
||||||
// int attributeTypeColor = gpu::Stream::COLOR;
|
|
||||||
const gpu::BufferView& colorsBufferView = getAttributeBuffer(attributeTypeColor);
|
const gpu::BufferView& colorsBufferView = getAttributeBuffer(attributeTypeColor);
|
||||||
gpu::BufferView::Index numColors = (gpu::BufferView::Index)colorsBufferView.getNumElements();
|
gpu::BufferView::Index numColors = (gpu::BufferView::Index)colorsBufferView.getNumElements();
|
||||||
for (gpu::BufferView::Index i = 0; i < numColors; i++) {
|
for (gpu::BufferView::Index i = 0; i < numColors; i++) {
|
||||||
|
|
|
@ -488,7 +488,9 @@ MeshProxyList Model::getMeshes() {
|
||||||
return glm::vec3(offsetMat * glm::vec4(position, 1.0f));
|
return glm::vec3(offsetMat * glm::vec4(position, 1.0f));
|
||||||
},
|
},
|
||||||
[=](glm::vec3 color) { return color; },
|
[=](glm::vec3 color) { return color; },
|
||||||
[=](glm::vec3 normal) { return glm::normalize(glm::vec3(offsetMat * glm::vec4(normal, 0.0f))); },
|
[=](glm::vec3 normal) {
|
||||||
|
return glm::normalize(glm::vec3(offsetMat * glm::vec4(normal, 0.0f)));
|
||||||
|
},
|
||||||
[&](uint32_t index) { return index; }));
|
[&](uint32_t index) { return index; }));
|
||||||
result << meshProxy;
|
result << meshProxy;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue