VertexLoader: inline destionation buffer

This commit is contained in:
degasus
2014-01-21 19:23:07 +01:00
parent c613868f57
commit 0b97b33ceb
4 changed files with 29 additions and 7 deletions

View File

@ -132,11 +132,17 @@ __forceinline u8* DataGetPosition()
return g_pVideoData;
}
template <typename T>
__forceinline void DataWrite(u8* &dst, T data)
{
*(T*)dst = data;
dst += sizeof(T);
}
template <typename T>
__forceinline void DataWrite(T data)
{
*(T*)VertexManager::s_pCurBufferPointer = data;
VertexManager::s_pCurBufferPointer += sizeof(T);
DataWrite(VertexManager::s_pCurBufferPointer, data);
}
#endif