Skip to content

Commit 1f52d2f

Browse files
author
devsh
committed
bring new Assets in line with Stageless Shaders API change
1 parent 776fb12 commit 1f52d2f

File tree

4 files changed

+4
-82
lines changed

4 files changed

+4
-82
lines changed

include/nbl/asset/ICPUGeometryCollection.h

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,6 @@ class NBL_API2 ICPUGeometryCollection : public IAsset, public IGeometryCollectio
5050
return retval;
5151
}
5252

53-
// TODO: remove after https://github.com/Devsh-Graphics-Programming/Nabla/pull/871 merge
54-
inline size_t getDependantCount() const override
55-
{
56-
size_t count = 0;
57-
visitDependents([&count](const IAsset* dep)->bool
58-
{
59-
count++;
60-
return true;
61-
}
62-
);
63-
return count;
64-
}
65-
6653
//
6754
inline bool setAABB(const IGeometryBase::SAABBStorage& aabb)
6855
{
@@ -105,7 +92,7 @@ class NBL_API2 ICPUGeometryCollection : public IAsset, public IGeometryCollectio
10592

10693
protected:
10794
//
108-
inline void visitDependents(std::function<bool(const IAsset*)> visit) const //override
95+
inline void visitDependents_impl(std::function<bool(const IAsset*)> visit) const override
10996
{
11097
auto nonNullOnly = [&visit](const IAsset* dep)->bool
11198
{
@@ -121,19 +108,6 @@ class NBL_API2 ICPUGeometryCollection : public IAsset, public IGeometryCollectio
121108
if (!nonNullOnly(geometry)) return;
122109
}
123110
}
124-
// TODO: remove after https://github.com/Devsh-Graphics-Programming/Nabla/pull/871 merge
125-
inline IAsset* getDependant_impl(const size_t ix) override
126-
{
127-
const IAsset* retval = nullptr;
128-
size_t current = 0;
129-
visitDependents([&](const IAsset* dep)->bool
130-
{
131-
retval = dep;
132-
return ix<current++;
133-
}
134-
);
135-
return const_cast<IAsset*>(retval);
136-
}
137111
};
138112

139113
}

include/nbl/asset/ICPUMorphTargets.h

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,6 @@ class NBL_API2 ICPUMorphTargets : public IAsset, public IMorphTargets<ICPUGeomet
4545
return retval;
4646
}
4747

48-
// TODO: remove after https://github.com/Devsh-Graphics-Programming/Nabla/pull/871 merge
49-
inline size_t getDependantCount() const override
50-
{
51-
size_t count = 0;
52-
visitDependents([&count](const IAsset* dep)->bool
53-
{
54-
count++;
55-
return true;
56-
}
57-
);
58-
return count;
59-
}
60-
6148
//
6249
inline core::vector<base_t::STarget>* getTargets()
6350
{
@@ -68,7 +55,7 @@ class NBL_API2 ICPUMorphTargets : public IAsset, public IMorphTargets<ICPUGeomet
6855

6956
protected:
7057
//
71-
inline void visitDependents(std::function<bool(const IAsset*)> visit) const //override
58+
inline void visitDependents_impl(std::function<bool(const IAsset*)> visit) const //override
7259
{
7360
auto nonNullOnly = [&visit](const IAsset* dep)->bool
7461
{
@@ -79,19 +66,6 @@ class NBL_API2 ICPUMorphTargets : public IAsset, public IMorphTargets<ICPUGeomet
7966
for (const auto& ref : m_targets)
8067
if (!nonNullOnly(ref.geoCollection.get())) return;
8168
}
82-
// TODO: remove after https://github.com/Devsh-Graphics-Programming/Nabla/pull/871 merge
83-
inline IAsset* getDependant_impl(const size_t ix) override
84-
{
85-
const IAsset* retval = nullptr;
86-
size_t current = 0;
87-
visitDependents([&](const IAsset* dep)->bool
88-
{
89-
retval = dep;
90-
return ix<current++;
91-
}
92-
);
93-
return const_cast<IAsset*>(retval);
94-
}
9569
};
9670

9771
}

include/nbl/asset/ICPUPolygonGeometry.h

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,6 @@ class NBL_API2 ICPUPolygonGeometry final : public IPolygonGeometry<ICPUBuffer>
4848
return retval;
4949
}
5050

51-
// TODO: remove after https://github.com/Devsh-Graphics-Programming/Nabla/pull/871 merge
52-
inline size_t getDependantCount() const override
53-
{
54-
size_t count = 0;
55-
visitDependents([&count](const IAsset* dep)->bool
56-
{
57-
count++;
58-
return true;
59-
}
60-
);
61-
return count;
62-
}
63-
6451
//
6552
inline bool setPositionView(SDataView&& view)
6653
{
@@ -166,7 +153,7 @@ class NBL_API2 ICPUPolygonGeometry final : public IPolygonGeometry<ICPUBuffer>
166153

167154
protected:
168155
//
169-
inline void visitDependents(std::function<bool(const IAsset*)> visit) const //override
156+
inline void visitDependents_impl(std::function<bool(const IAsset*)> visit) const override
170157
{
171158
auto nonNullOnly = [&visit](const IAsset* dep)->bool
172159
{
@@ -186,19 +173,6 @@ class NBL_API2 ICPUPolygonGeometry final : public IPolygonGeometry<ICPUBuffer>
186173
if (!nonNullOnly(view.src.buffer.get())) return;
187174
if (!nonNullOnly(m_normalView.src.buffer.get())) return;
188175
}
189-
// TODO: remove after https://github.com/Devsh-Graphics-Programming/Nabla/pull/871 merge
190-
inline IAsset* getDependant_impl(const size_t ix) override
191-
{
192-
const IAsset* retval = nullptr;
193-
size_t current = 0;
194-
visitDependents([&](const IAsset* dep)->bool
195-
{
196-
retval = dep;
197-
return ix<current++;
198-
}
199-
);
200-
return const_cast<IAsset*>(retval);
201-
}
202176
};
203177

204178
}

0 commit comments

Comments
 (0)