Skip to content

Commit 5b066f8

Browse files
author
devsh
committed
get stuff to compile
1 parent fa02163 commit 5b066f8

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

include/nbl/asset/ICPUPolygonGeometry.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ class NBL_API2 ICPUPolygonGeometry final : public IPolygonGeometry<ICPUBuffer>
130130
}
131131

132132
//
133+
inline const core::vector<SDataView>& getAuxAttributeViews() const {return base_t::getAuxAttributeViews();}
133134
inline core::vector<SDataView>* getAuxAttributeViews()
134135
{
135136
if (isMutable())

include/nbl/asset/IGeometry.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,11 @@ class NBL_FORCE_EBO NBL_NO_VTABLE INotCloneable {};
202202

203203
// A geometry should map 1:1 to a BLAS geometry, Meshlet or a Drawcall in API terms
204204
template<class BufferType>
205-
class NBL_API2 IGeometry : public std::conditional_t<std::is_same_v<BufferType,ICPUBuffer>,IAsset,impl::INotCloneable>, public IGeometryBase
205+
class IGeometry : public std::conditional_t<std::is_same_v<BufferType,ICPUBuffer>,IAsset,impl::INotCloneable>, public IGeometryBase
206206
{
207207
public:
208208
//
209-
virtual bool valid() const override
209+
virtual inline bool valid() const override
210210
{
211211
if (!m_positionView)
212212
return false;
@@ -373,7 +373,7 @@ class NBL_API2 IGeometry : public std::conditional_t<std::is_same_v<BufferType,I
373373

374374
// for geometries which can be indexed with an index buffer
375375
template<class BufferType>
376-
class NBL_API2 IIndexableGeometry : public IGeometry<BufferType>
376+
class IIndexableGeometry : public IGeometry<BufferType>
377377
{
378378
protected:
379379
using SDataView = IGeometry<BufferType>::SDataView;
@@ -389,12 +389,12 @@ class NBL_API2 IIndexableGeometry : public IGeometry<BufferType>
389389
}
390390

391391
protected:
392-
virtual ~IIndexableGeometry() = default;
392+
virtual inline ~IIndexableGeometry() = default;
393393

394394
// Needs to be hidden because ICPU base class shall check mutability
395395
inline bool setIndexView(SDataView&& view)
396396
{
397-
if (!view || view.isFormattedScalarInteger())
397+
if (!view || view.composed.isFormattedScalarInteger())
398398
{
399399
m_indexView = std::move(view);
400400
return true;

include/nbl/asset/IPolygonGeometry.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
namespace nbl::asset
1515
{
1616
//
17-
class NBL_API2 IPolygonGeometryBase : public virtual core::IReferenceCounted
17+
class IPolygonGeometryBase : public virtual core::IReferenceCounted
1818
{
1919
public:
2020
//
21-
class NBL_API2 IIndexingCallback
21+
class IIndexingCallback
2222
{
2323
public:
2424
// how many vertices per polygon
@@ -88,22 +88,22 @@ class NBL_API2 IPolygonGeometryBase : public virtual core::IReferenceCounted
8888
virtual uint8_t rate_impl() const = 0;
8989
};
9090
//
91-
static IIndexingCallback* PointList();
92-
static IIndexingCallback* LineList();
93-
static IIndexingCallback* TriangleList();
94-
static IIndexingCallback* QuadList();
91+
NBL_API2 static IIndexingCallback* PointList();
92+
NBL_API2 static IIndexingCallback* LineList();
93+
NBL_API2 static IIndexingCallback* TriangleList();
94+
NBL_API2 static IIndexingCallback* QuadList();
9595
// TODO: Adjacency, Patch, etc.
96-
static IIndexingCallback* TriangleStrip();
97-
static IIndexingCallback* TriangleFan();
96+
NBL_API2 static IIndexingCallback* TriangleStrip();
97+
NBL_API2 static IIndexingCallback* TriangleFan();
9898

9999
// This should be a pointer to a stateless singleton (think of it more like a dynamic enum/template than anything else)
100100
inline const IIndexingCallback* getIndexingCallback() const {return m_indexing;}
101101

102102
protected:
103-
virtual ~IPolygonGeometryBase() = default;
103+
virtual inline ~IPolygonGeometryBase() = default;
104104

105105
// indexing callback cannot be cleared
106-
bool setIndexingCallback(IIndexingCallback* indexing)
106+
inline bool setIndexingCallback(IIndexingCallback* indexing)
107107
{
108108
if (!indexing)
109109
return false;
@@ -121,7 +121,7 @@ class NBL_API2 IPolygonGeometryBase : public virtual core::IReferenceCounted
121121
// Don't want to overengineer, support for variable vertex count (order) polgyon meshes is not encouraged or planned.
122122
// If you want different polygon types in same model, bucket the polgyons into separate geometries and reunite in a single collection.
123123
template<class BufferType>
124-
class NBL_API2 IPolygonGeometry : public IIndexableGeometry<BufferType>, public IPolygonGeometryBase
124+
class IPolygonGeometry : public IIndexableGeometry<BufferType>, public IPolygonGeometryBase
125125
{
126126
using base_t = IIndexableGeometry<BufferType>;
127127

@@ -216,7 +216,7 @@ class NBL_API2 IPolygonGeometry : public IIndexableGeometry<BufferType>, public
216216
// disallowed index format
217217
if (base_t::m_indexView)
218218
{
219-
switch (base_t::m_indexView.format)
219+
switch (base_t::m_indexView.composed.format)
220220
{
221221
case EF_R16_UINT:
222222
indexType = EIT_16BIT;
@@ -230,11 +230,11 @@ class NBL_API2 IPolygonGeometry : public IIndexableGeometry<BufferType>, public
230230
if (indexType==EIT_UNKNOWN)
231231
return retval;
232232
}
233-
retval.vertexData[0] = base_t::m_positionView;
234-
retval.indexData = base_t::m_indexView;
233+
retval.vertexData[0] = base_t::m_positionView.src;
234+
retval.indexData = base_t::m_indexView.src;
235235
retval.maxVertex = base_t::m_positionView.getElementCount();
236-
retval.vertexStride = base_t::m_positionView.getStride();
237-
retval.vertexFormat = base_t::m_positionView.format;
236+
retval.vertexStride = base_t::m_positionView.composed.getStride();
237+
retval.vertexFormat = base_t::m_positionView.composed.format;
238238
retval.indexType = indexType;
239239
}
240240
return retval;

0 commit comments

Comments
 (0)