Skip to content

Commit

Permalink
Fix stuff according to PR #293
Browse files Browse the repository at this point in the history
  • Loading branch information
Capital-Asterisk committed Jun 20, 2024
1 parent 4ef82be commit b4141b7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/osp/core/array_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
// IWYU pragma: begin_exports
#include <Corrade/Containers/ArrayView.h>
#include <Corrade/Containers/StridedArrayView.h>
#include <Corrade/Containers/StridedArrayViewStl.h>
// IWYU pragma: end_exports

#include <iterator>
Expand Down
14 changes: 7 additions & 7 deletions src/osp/core/buffer_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class BufferFormatBuilder
}

/**
* @brief Insert interleved attribute data
* @brief Insert interleaved attribute data
*
* To make the buffer format [XYZXYZXYZXYZ...] for example, use:
*
Expand All @@ -104,13 +104,13 @@ class BufferFormatBuilder
* @param count [in] Number of elements
*/
template <typename ... T>
constexpr void insert_interleave(std::size_t count, BufAttribFormat<T>& ... rInterleve)
constexpr void insert_interleave(std::size_t count, BufAttribFormat<T>& ... rInterleave)
{
constexpr std::size_t stride = (sizeof(T) + ...);

(rInterleve.m_stride = ... = stride);
(rInterleave.m_stride = ... = stride);

interleave_aux(m_totalSize, rInterleve ...);
interleave_aux(m_totalSize, rInterleave ...);

m_totalSize += stride * count;
}
Expand All @@ -123,13 +123,13 @@ class BufferFormatBuilder
private:

template <typename FIRST_T, typename ... T>
constexpr void interleave_aux(std::size_t const pos, BufAttribFormat<FIRST_T>& rInterleveFirst, BufAttribFormat<T>& ... rInterleve)
constexpr void interleave_aux(std::size_t const pos, BufAttribFormat<FIRST_T>& rInterleaveFirst, BufAttribFormat<T>& ... rInterleave)
{
rInterleveFirst.m_offset = pos;
rInterleaveFirst.m_offset = pos;

if constexpr (sizeof...(T) != 0)
{
interleave_aux(pos + sizeof(FIRST_T), rInterleve ...);
interleave_aux(pos + sizeof(FIRST_T), rInterleave ...);
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/osp/drawing_gl/rendergl.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "FullscreenTriShader.h"

#include "../core/strong_id.h"
#include "../drawing/drawing_fn.h"

#include <Magnum/GL/Mesh.h>
Expand All @@ -41,8 +42,8 @@
namespace osp::draw
{

enum class TexGlId : uint32_t { };
enum class MeshGlId : uint32_t { };
using TexGlId = osp::StrongId<std::uint32_t, struct DummyForTexGLId>;
using MeshGlId = osp::StrongId<std::uint32_t, struct DummyForMeshGlId>;

using TexGlStorage_t = Storage_t<TexGlId, Magnum::GL::Texture2D>;
using MeshGlStorage_t = Storage_t<MeshGlId, Magnum::GL::Mesh>;
Expand Down

0 comments on commit b4141b7

Please sign in to comment.