diff options
| author | degasus <wickmarkus@web.de> | 2014-01-21 23:44:51 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2014-01-21 23:44:51 +0100 |
| commit | 3cb5bb3b302809eb089b12d8ad6eb528d7db90ee (patch) | |
| tree | f26bfa3bb3840eae56374d205907b74e026c7ad1 /Source/Core/VideoCommon/VertexLoader_Position.cpp | |
| parent | 0b97b33ceb58cd72a9586c438f39866ec032d9a4 (diff) | |
VertexLoader: temp class for reader/writer
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_Position.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader_Position.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_Position.cpp b/Source/Core/VideoCommon/VertexLoader_Position.cpp index 6163272fb1..ee26acfbe7 100644 --- a/Source/Core/VideoCommon/VertexLoader_Position.cpp +++ b/Source/Core/VideoCommon/VertexLoader_Position.cpp @@ -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(); } |
