mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Put all pieces together and clean up leftover code
This commit is contained in:
parent
6b7fc1e9fe
commit
62131fe295
11 changed files with 105 additions and 169 deletions
|
@ -145,19 +145,18 @@ private:
|
|||
*
|
||||
* Attach alternate `Indices` to an existing mesh buffer, to make it possible to use different
|
||||
* indices with the same vertex buffer.
|
||||
*
|
||||
*/
|
||||
class PartialMeshBuffer
|
||||
{
|
||||
public:
|
||||
PartialMeshBuffer(scene::SMeshBuffer *buffer, std::vector<u16> &&vertex_indices) :
|
||||
m_buffer(buffer)
|
||||
m_buffer(buffer), m_indices(make_irr<scene::SIndexBuffer>())
|
||||
{
|
||||
m_indices.reset(new scene::SIndexBuffer());
|
||||
m_indices->Data = std::move(vertex_indices);
|
||||
m_indices->setHardwareMappingHint(scene::EHM_STATIC);
|
||||
}
|
||||
|
||||
scene::IMeshBuffer *getBuffer() const { return m_buffer; }
|
||||
auto *getBuffer() const { return m_buffer; }
|
||||
|
||||
void draw(video::IVideoDriver *driver) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue