msvc.patch 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. diff --git a/src/Magnum/GL/Buffer.cpp b/src/Magnum/GL/Buffer.cpp
  2. index 5fa02c2..038e001 100644
  3. --- a/src/Magnum/GL/Buffer.cpp
  4. +++ b/src/Magnum/GL/Buffer.cpp
  5. @@ -419,7 +419,7 @@ void Buffer::bindImplementationMulti(const Target target, const GLuint firstInde
  6. }
  7. }
  8. - glBindBuffersRange(GLenum(target), firstIndex, buffers.size(), ids, offsetsSizes, offsetsSizes + buffers.size());
  9. + glBindBuffersRange(GLenum(target), firstIndex, buffers.size(), ids, offsetsSizes, offsetsSizes.data() + buffers.size());
  10. }
  11. #endif
  12. diff --git a/src/Magnum/Implementation/ImageProperties.h b/src/Magnum/Implementation/ImageProperties.h
  13. index d6326cf..6eedae0 100644
  14. --- a/src/Magnum/Implementation/ImageProperties.h
  15. +++ b/src/Magnum/Implementation/ImageProperties.h
  16. @@ -70,7 +70,7 @@ template<UnsignedInt dimensions, class T, class Image, class Data> Containers::S
  17. static_assert(sizeof(decltype(image.data().front())) == 1,
  18. "pointer arithmetic expects image data type to have 1 byte");
  19. - return {data.suffix(properties.first[dimensions - 1]), data + properties.first.sum(), size, stride};
  20. + return {data.suffix(properties.first[dimensions - 1]), data.data() + properties.first.sum(), size, stride};
  21. }
  22. }}
  23. diff --git a/src/Magnum/MeshTools/Concatenate.cpp b/src/Magnum/MeshTools/Concatenate.cpp
  24. index 38a7bc1..c20eeb9 100644
  25. --- a/src/Magnum/MeshTools/Concatenate.cpp
  26. +++ b/src/Magnum/MeshTools/Concatenate.cpp
  27. @@ -73,7 +73,7 @@ Trade::MeshData concatenate(Containers::Array<char>&& indexData, const UnsignedI
  28. attribute = Trade::MeshAttributeData{
  29. attribute.name(), attribute.format(),
  30. Containers::StridedArrayView1D<void>{vertexData,
  31. - vertexData + attribute.offset(vertexData),
  32. + vertexData.data() + attribute.offset(vertexData),
  33. vertexCount, attribute.stride()},
  34. attribute.arraySize()};
  35. }
  36. @@ -130,7 +130,7 @@ Trade::MeshData concatenate(Containers::Array<char>&& indexData, const UnsignedI
  37. /* Otherwise, if we need an index buffer (meaning at least one of the
  38. meshes is indexed), generate a trivial index buffer */
  39. } else if(!indices.empty()) {
  40. - std::iota(indices + indexOffset, indices + indexOffset + mesh.vertexCount(), UnsignedInt(vertexOffset));
  41. + std::iota(indices.data() + indexOffset, indices.data() + indexOffset + mesh.vertexCount(), UnsignedInt(vertexOffset));
  42. indexOffset += mesh.vertexCount();
  43. }
  44. diff --git a/src/Magnum/MeshTools/Interleave.cpp b/src/Magnum/MeshTools/Interleave.cpp
  45. index b98c589..c16fd74 100644
  46. --- a/src/Magnum/MeshTools/Interleave.cpp
  47. +++ b/src/Magnum/MeshTools/Interleave.cpp
  48. @@ -224,7 +224,7 @@ Trade::MeshData interleavedLayout(Trade::MeshData&& data, const UnsignedInt vert
  49. attribute = Trade::MeshAttributeData{
  50. attribute.name(), attribute.format(),
  51. Containers::StridedArrayView1D<void>{vertexData,
  52. - vertexData + attribute.offset(vertexData),
  53. + vertexData.data() + attribute.offset(vertexData),
  54. vertexCount, attribute.stride()},
  55. attribute.arraySize()};
  56. }
  57. @@ -261,7 +261,7 @@ Trade::MeshData interleave(Trade::MeshData&& data, const Containers::ArrayView<c
  58. indexData = Containers::Array<char>{data.indexData().size()};
  59. Utility::copy(data.indexData(), indexData);
  60. indices = Trade::MeshIndexData{data.indexType(),
  61. - Containers::ArrayView<const void>{indexData + data.indexOffset(), data.indices().size()[0]*data.indices().size()[1]}};
  62. + Containers::ArrayView<const void>{indexData.data() + data.indexOffset(), data.indices().size()[0]*data.indices().size()[1]}};
  63. }
  64. }