diff options
author | aap <aap@papnet.eu> | 2019-07-11 09:09:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-11 09:09:21 +0200 |
commit | 3e1455cc37cfec35f77b1b933c6c16316684fe7d (patch) | |
tree | fa82496d356ac2b77ffa1ab00684b0150907f009 /src/render/RenderBuffer.cpp | |
parent | Merge pull request #129 from erorcun/erorcun (diff) | |
parent | Merge branch 'master' into master (diff) | |
download | re3-3e1455cc37cfec35f77b1b933c6c16316684fe7d.tar re3-3e1455cc37cfec35f77b1b933c6c16316684fe7d.tar.gz re3-3e1455cc37cfec35f77b1b933c6c16316684fe7d.tar.bz2 re3-3e1455cc37cfec35f77b1b933c6c16316684fe7d.tar.lz re3-3e1455cc37cfec35f77b1b933c6c16316684fe7d.tar.xz re3-3e1455cc37cfec35f77b1b933c6c16316684fe7d.tar.zst re3-3e1455cc37cfec35f77b1b933c6c16316684fe7d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/render/RenderBuffer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/render/RenderBuffer.cpp b/src/render/RenderBuffer.cpp index 9a1ed58d..1b91156e 100644 --- a/src/render/RenderBuffer.cpp +++ b/src/render/RenderBuffer.cpp @@ -5,7 +5,7 @@ int32 &TempBufferVerticesStored = *(int32*)0x8F5F78; int32 &TempBufferIndicesStored = *(int32*)0x8F1A4C; -RwIm3DVertex *TempVertexBuffer = (RwIm3DVertex*)0x862330; +RwIm3DVertex *TempBufferRenderVertices = (RwIm3DVertex*)0x862330; RwImVertexIndex *TempBufferRenderIndexList = (RwImVertexIndex*)0x846288; int RenderBuffer::VerticesToBeStored; @@ -21,12 +21,12 @@ RenderBuffer::ClearRenderBuffer(void) void RenderBuffer::StartStoring(int numIndices, int numVertices, RwImVertexIndex **indexStart, RwIm3DVertex **vertexStart) { - if(TempBufferIndicesStored + numIndices >= 1024) + if(TempBufferIndicesStored + numIndices >= TEMPBUFFERINDEXSIZE) RenderStuffInBuffer(); - if(TempBufferVerticesStored + numVertices >= 256) + if(TempBufferVerticesStored + numVertices >= TEMPBUFFERVERTSIZE) RenderStuffInBuffer(); *indexStart = &TempBufferRenderIndexList[TempBufferIndicesStored]; - *vertexStart = &TempVertexBuffer[TempBufferVerticesStored]; + *vertexStart = &TempBufferRenderVertices[TempBufferVerticesStored]; IndicesToBeStored = numIndices; VerticesToBeStored = numVertices; } @@ -44,7 +44,7 @@ RenderBuffer::StopStoring(void) void RenderBuffer::RenderStuffInBuffer(void) { - if(TempBufferVerticesStored && RwIm3DTransform(TempVertexBuffer, TempBufferVerticesStored, nil, rwIM3D_VERTEXUV)){ + if(TempBufferVerticesStored && RwIm3DTransform(TempBufferRenderVertices, TempBufferVerticesStored, nil, rwIM3D_VERTEXUV)){ RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, TempBufferRenderIndexList, TempBufferIndicesStored); RwIm3DEnd(); } |