mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
VertexLoader: temp class for reader/writer
This commit is contained in:
parent
0b97b33ceb
commit
3cb5bb3b30
4 changed files with 45 additions and 29 deletions
|
@ -77,12 +77,11 @@ void LOADERDECL Pos_ReadDirect()
|
|||
{
|
||||
static_assert(N <= 3, "N > 3 is not sane!");
|
||||
auto const scale = posScale;
|
||||
auto dst = VertexManager::s_pCurBufferPointer;
|
||||
DataWriter dst;
|
||||
DataReader src;
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
DataWrite(dst, i<N ? PosScale(DataRead<T>(), scale) : 0.f);
|
||||
|
||||
VertexManager::s_pCurBufferPointer = dst;
|
||||
dst.Write(i<N ? PosScale(src.Read<T>(), scale) : 0.f);
|
||||
|
||||
LOG_VTX();
|
||||
}
|
||||
|
@ -96,12 +95,10 @@ void LOADERDECL Pos_ReadIndex()
|
|||
auto const index = DataRead<I>();
|
||||
auto const data = reinterpret_cast<const T*>(cached_arraybases[ARRAY_POSITION] + (index * arraystrides[ARRAY_POSITION]));
|
||||
auto const scale = posScale;
|
||||
auto dst = VertexManager::s_pCurBufferPointer;
|
||||
DataWriter dst;
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
DataWrite(dst, i<N ? PosScale(Common::FromBigEndian(data[i]), scale) : 0.f);
|
||||
|
||||
VertexManager::s_pCurBufferPointer = dst;
|
||||
dst.Write(i<N ? PosScale(Common::FromBigEndian(data[i]), scale) : 0.f);
|
||||
|
||||
LOG_VTX();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue