Browse Source

MeshTools: removed deprecated compressIndices() overload.

Use the general one instead.
pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
b6051944e6
  1. 15
      src/Magnum/MeshTools/CompressIndices.cpp
  2. 18
      src/Magnum/MeshTools/CompressIndices.h

15
src/Magnum/MeshTools/CompressIndices.cpp

@ -30,7 +30,6 @@
#include <Corrade/Containers/Array.h>
#include "Magnum/Math/Functions.h"
#include "Magnum/Buffer.h"
namespace Magnum { namespace MeshTools {
@ -76,18 +75,4 @@ std::tuple<Containers::Array<char>, Mesh::IndexType, UnsignedInt, UnsignedInt> c
return std::make_tuple(std::move(typeData.first), typeData.second, *minmax.first, *minmax.second);
}
#ifdef MAGNUM_BUILD_DEPRECATED
void compressIndices(Mesh& mesh, Buffer& buffer, BufferUsage usage, const std::vector<UnsignedInt>& indices) {
Containers::Array<char> data;
Mesh::IndexType type;
UnsignedInt start, end;
std::tie(data, type, start, end) = compressIndices(indices);
buffer.setData(data, usage);
mesh.setCount(indices.size())
.setIndexBuffer(buffer, 0, type, start, end);
}
#endif
}}

18
src/Magnum/MeshTools/CompressIndices.h

@ -66,24 +66,6 @@ mesh.setCount(indices.size())
*/
std::tuple<Containers::Array<char>, Mesh::IndexType, UnsignedInt, UnsignedInt> MAGNUM_MESHTOOLS_EXPORT compressIndices(const std::vector<UnsignedInt>& indices);
#ifdef MAGNUM_BUILD_DEPRECATED
/**
@brief Compress vertex indices and write them to index buffer
@param mesh Output mesh
@param buffer Index buffer
@param usage Index buffer usage
@param indices Index array
The same as @ref compressIndices(const std::vector<UnsignedInt>&), but this
function writes the output to given buffer and calls @ref Mesh::setCount() and
@ref Mesh::setIndexBuffer(), thus you don't need to do anything else for mesh
index configuration.
@deprecated Use general-purpose @ref compressIndices(const std::vector<UnsignedInt>&)
instead.
*/
void MAGNUM_MESHTOOLS_EXPORT compressIndices(Mesh& mesh, Buffer& buffer, BufferUsage usage, const std::vector<UnsignedInt>& indices);
#endif
}}
#endif

Loading…
Cancel
Save