mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
uint32 size indices and vertexBaseIndex to Forsyth (#1304)
- Forsyth::OptimizeFaces() now has 2 overloads, 1 for uint16_t and one for uint32_t sized indices. Internally each overload now calls down to the templated OptimizeFacesImpl() providing the respective index type. - The new 'vertexBaseIndex' is the starting vertex index subtracted from each index in indexList to allow safe operation on multiple objects in a single index buffer. - Also replaced the interal int typedefs with common types provided by stdint.h
This commit is contained in:
committed by
Branimir Karadžić
parent
de9d9671fa
commit
1f3846224b
@@ -126,7 +126,7 @@ long int fsize(FILE* _file)
|
||||
void triangleReorder(uint16_t* _indices, uint32_t _numIndices, uint32_t _numVertices, uint16_t _cacheSize)
|
||||
{
|
||||
uint16_t* newIndexList = new uint16_t[_numIndices];
|
||||
Forsyth::OptimizeFaces(_indices, _numIndices, _numVertices, newIndexList, _cacheSize);
|
||||
Forsyth::OptimizeFaces(_indices, _numIndices, _numVertices, 0, newIndexList, _cacheSize);
|
||||
bx::memCopy(_indices, newIndexList, _numIndices*2);
|
||||
delete [] newIndexList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user