summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader_Normal.cpp
diff options
context:
space:
mode:
authorMarkus Wick <markus+github@selfnet.de>2014-12-10 06:53:11 +0100
committerMarkus Wick <markus+github@selfnet.de>2014-12-10 06:53:11 +0100
commit4c139ca7cc816489feffc0b6ee0a3f1a6d85060e (patch)
treee16ae78d1428f5ae62e68541bc8fe46bd3693d34 /Source/Core/VideoCommon/VertexLoader_Normal.cpp
parent57d2469d93ca6e2d3e0efe7c0efa85dfb95ed9c0 (diff)
parente88e63adb36d649903a54740d9580a491cd6bf0d (diff)
Merge pull request #1609 from degasus/datareader
VideoCommon: Datareader
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_Normal.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Normal.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_Normal.cpp b/Source/Core/VideoCommon/VertexLoader_Normal.cpp
index 8ff5a767e7..1e428b66a2 100644
--- a/Source/Core/VideoCommon/VertexLoader_Normal.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_Normal.cpp
@@ -14,7 +14,7 @@
#include "VideoCommon/VideoCommon.h"
// warning: mapping buffer should be disabled to use this
-#define LOG_NORM() // PRIM_LOG("norm: %f %f %f, ", ((float*)VertexManager::s_pCurBufferPointer)[-3], ((float*)VertexManager::s_pCurBufferPointer)[-2], ((float*)VertexManager::s_pCurBufferPointer)[-1]);
+#define LOG_NORM() // PRIM_LOG("norm: %f %f %f, ", ((float*)g_vertex_manager_write_ptr)[-3], ((float*)g_vertex_manager_write_ptr)[-2], ((float*)g_vertex_manager_write_ptr)[-1]);
VertexLoader_Normal::Set VertexLoader_Normal::m_Table[NUM_NRM_TYPE][NUM_NRM_INDICES][NUM_NRM_ELEMENTS][NUM_NRM_FORMAT];
@@ -43,13 +43,14 @@ template <typename T, int N>
__forceinline void ReadIndirect(const T* data)
{
static_assert(3 == N || 9 == N, "N is only sane as 3 or 9!");
- DataWriter dst;
+ DataReader dst(g_vertex_manager_write_ptr, nullptr);
for (int i = 0; i != N; ++i)
{
dst.Write(FracAdjust(Common::FromBigEndian(data[i])));
}
+ dst.WritePointer(&g_vertex_manager_write_ptr);
LOG_NORM();
}