mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 10:14:28 +02:00
Optimize getVertexStream() by using a const&
This commit is contained in:
parent
9276c78368
commit
c6e6aceb85
2 changed files with 1 additions and 3 deletions
|
@ -58,7 +58,7 @@ public:
|
||||||
const gpu::Stream::FormatPointer getVertexFormat() const { return _vertexFormat; }
|
const gpu::Stream::FormatPointer getVertexFormat() const { return _vertexFormat; }
|
||||||
|
|
||||||
// BufferStream on the mesh vertices and attributes matching the vertex format
|
// BufferStream on the mesh vertices and attributes matching the vertex format
|
||||||
const gpu::BufferStream getVertexStream() const { return _vertexStream; }
|
const gpu::BufferStream& getVertexStream() const { return _vertexStream; }
|
||||||
|
|
||||||
// Index Buffer
|
// Index Buffer
|
||||||
void setIndexBuffer(const BufferView& buffer);
|
void setIndexBuffer(const BufferView& buffer);
|
||||||
|
|
|
@ -819,8 +819,6 @@ model::MeshPointer DeferredLightingEffect::getSpotLightMesh() {
|
||||||
//DEBUG: model::Mesh::Part part(0, indices, 0, model::Mesh::LINE_STRIP);
|
//DEBUG: model::Mesh::Part part(0, indices, 0, model::Mesh::LINE_STRIP);
|
||||||
|
|
||||||
_spotLightMesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(sizeof(part), (gpu::Byte*) &part), gpu::Element::PART_DRAWCALL));
|
_spotLightMesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(sizeof(part), (gpu::Byte*) &part), gpu::Element::PART_DRAWCALL));
|
||||||
|
|
||||||
_spotLightMesh->getVertexStream();
|
|
||||||
}
|
}
|
||||||
return _spotLightMesh;
|
return _spotLightMesh;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue