Skip to content

Commit d654a25

Browse files
author
devsh
committed
get stuff to compile
1 parent 30eff84 commit d654a25

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

include/nbl/asset/IPolygonGeometry.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class NBL_API2 IPolygonGeometryBase : public virtual core::IReferenceCounted
4040
struct SContext final
4141
{
4242
// `indexOfIndex` is somewhat of a baseIndex
43-
inline void streamOut(const uint32_t indexOfIndex, const std::span<const int32_t> permutation)
43+
template<typename Range>
44+
inline void streamOut(const uint32_t indexOfIndex, const Range& permutation)
4445
{
4546
auto& typedOut = reinterpret_cast<OutT*&>(out);
4647
if (indexBuffer)

src/nbl/asset/ICPUPolygonGeometry.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class CListIndexingCB final : public IPolygonGeometryBase::IIndexingCallback
1414
{
1515
auto indexOfIndex = ctx.beginPrimitive*3;
1616
for (const auto end=ctx.endPrimitive*3; indexOfIndex!=end; indexOfIndex+=3)
17-
ctx.streamOut(indexOfIndex,std::ranges::iota_view{0,Order});
17+
ctx.streamOut(indexOfIndex,std::ranges::iota_view{0,int(Order)});
1818
}
1919

2020
public:
@@ -60,12 +60,12 @@ auto IPolygonGeometryBase::QuadList() -> IIndexingCallback*
6060
return &singleton;
6161
}
6262

63-
class CTriangleStripIndexingCB final : public IIndexingCallback
63+
class CTriangleStripIndexingCB final : public IPolygonGeometryBase::IIndexingCallback
6464
{
6565
template<typename OutT>
6666
static void operator_impl(SContext<OutT>& ctx)
6767
{
68-
auto indexOfIndex;
68+
uint64_t indexOfIndex;
6969
if (ctx.beginPrimitive==0)
7070
{
7171
ctx.streamOut(0,std::ranges::iota_view{0,3});
@@ -93,20 +93,20 @@ auto IPolygonGeometryBase::TriangleStrip() -> IIndexingCallback*
9393
return &singleton;
9494
}
9595

96-
class CTriangleFanIndexingCB final : public IIndexingCallback
96+
class CTriangleFanIndexingCB final : public IPolygonGeometryBase::IIndexingCallback
9797
{
9898
template<typename OutT>
9999
static void operator_impl(SContext<OutT>& ctx)
100100
{
101-
auto indexOfIndex;
101+
uint64_t indexOfIndex;
102102
if (ctx.beginPrimitive==0)
103103
{
104104
ctx.streamOut(0,std::ranges::iota_view{0,3});
105105
indexOfIndex = 3;
106106
}
107107
else
108108
indexOfIndex = ctx.beginPrimitive+2;
109-
int32_t perm[] = {0xdeadbeefu,-1,0};
109+
int32_t perm[] = {0x7eadbeefu,-1,0};
110110
for (const auto end=ctx.endPrimitive+2; indexOfIndex!=end; indexOfIndex++)
111111
{
112112
// first index is always global 0

0 commit comments

Comments
 (0)