Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4a37ba5
Implement createCylinder, createCone, createSphere, CreateArrow
Jun 25, 2025
2d8b7c4
Implement getIndexType convenience function for IPolygonGeometry
Jun 25, 2025
cdcaae9
Implement createIcosphere
Jun 28, 2025
2e063d7
Remove color parameter from create<Geometry>
Jun 28, 2025
f0b5064
Fix indentation
Jun 28, 2025
68a689c
Fix normal and uv type
Jun 29, 2025
ca7f182
Return nullptr if vertexCount overflow
Jun 29, 2025
a2b7b04
Remove simd vector from normal quantization cache
Jul 1, 2025
83f39d3
Fix SBuferRange to SBufferBinding conversion requirement
Jul 1, 2025
983ace9
createArrow multiple geometries
Jul 1, 2025
090dae2
DRY findLSB
Jul 2, 2025
9e9e233
Merge branch 'master' into mesh_loaders_kevin
Jul 3, 2025
d36687f
Add missing ECommonEnums.cpp to CMakelists.txt
Jul 3, 2025
bd3a266
Extract some common attribute view creation into its own function
Jul 18, 2025
489e2f2
Slight type naming improvement in geometry creator
Jul 18, 2025
de02323
Fix bug prone constant
Jul 18, 2025
1964b27
Accept tesselation as uint16_t parameter
Jul 18, 2025
2157235
Remove reciprocal_approxim usage
Jul 18, 2025
7728987
use hlsl::numbers instead of constant from core
Jul 18, 2025
53f81af
Reorder normal calculation so no need to normalize position
Jul 18, 2025
e29bbf9
Remove packSnorm
Jul 18, 2025
b957ca7
Small impovement on Icosphere index_t
Jul 18, 2025
75d486d
Remove unnecessary method on Icosphere
Jul 18, 2025
e0013cb
Fix normal quantization cache
Jul 21, 2025
4afd072
implement constexpr findLSB
Jul 23, 2025
a001472
Remove unused include
Jul 23, 2025
f8e837b
Fix createArrow to return ICPUGeometryCollection instead of vector of…
Jul 25, 2025
6552952
Add more ray tracing intersection query
Jul 25, 2025
e0b30d0
Add transform.hlsl to cmakelists
Jul 25, 2025
c6dd9ac
Transform data minimum alignment fix
Jul 25, 2025
c45f29c
Merge branch 'master' into mesh_loaders_kevin
Jul 25, 2025
86dae55
Fix after merge with master
Jul 25, 2025
c7caf76
Fix uninitialized bug in quantization cache
Jul 26, 2025
ae5a755
Add some comment in quantization cache
Jul 26, 2025
02d6c6d
Fix indentation in CGeometryCreator.cpp
Jul 28, 2025
bb45773
Fix indentation of CDirQuantCacheBase.h
Jul 28, 2025
1bedf2d
Fix indentation of CGeometryCreator.h
Jul 28, 2025
50b6493
Merge branch 'master' into mesh_loaders_kevin
Jul 30, 2025
b152755
Fix small things
Jul 31, 2025
daea0ad
Implement rotation_mat function on hlsl
Aug 4, 2025
a6ef74c
Small fixes on quantization cache.
Aug 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 21 additions & 19 deletions include/nbl/asset/IPolygonGeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,26 @@ class IPolygonGeometry : public IIndexableGeometry<BufferType>, public IPolygonG
// For User defined semantics
inline const core::vector<SDataView>& getAuxAttributeViews() const {return m_auxAttributeViews;}

inline E_INDEX_TYPE getIndexType() const
{
auto indexType = EIT_UNKNOWN;
// disallowed index format
if (base_t::m_indexView)
{
switch (base_t::m_indexView.composed.format)
{
case EF_R16_UINT:
indexType = EIT_16BIT;
break;
case EF_R32_UINT: [[fallthrough]];
indexType = EIT_32BIT;
break;
default:
break;
}
}
return indexType;
}

// Does not set the `transform` or `geometryFlags` fields, because it doesn't care about it.
// Also won't set second set of vertex data, opacity mipmaps, etc.
Expand All @@ -212,30 +232,12 @@ class IPolygonGeometry : public IIndexableGeometry<BufferType>, public IPolygonG
// must be a triangle list, but don't want to compare pointers
if (m_indexing && m_indexing->knownTopology()==EPT_TRIANGLE_LIST)// && m_indexing->degree() == TriangleList()->degree() && m_indexing->rate() == TriangleList->rate())
{
auto indexType = EIT_UNKNOWN;
// disallowed index format
if (base_t::m_indexView)
{
switch (base_t::m_indexView.composed.format)
{
case EF_R16_UINT:
indexType = EIT_16BIT;
break;
case EF_R32_UINT: [[fallthrough]];
indexType = EIT_32BIT;
break;
default:
break;
}
if (indexType==EIT_UNKNOWN)
return retval;
}
retval.vertexData[0] = base_t::m_positionView.src;
retval.indexData = base_t::m_indexView.src;
retval.maxVertex = base_t::m_positionView.getElementCount() - 1;
retval.vertexStride = base_t::m_positionView.composed.getStride();
retval.vertexFormat = base_t::m_positionView.composed.format;
retval.indexType = indexType;
retval.indexType = getIndexType();
}
return retval;
}
Expand Down
Loading
Loading