diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-07-17 23:03:57 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-07-17 23:03:57 +0200 |
commit | c937bdbfea8f522d14d7a41f24372bddf5bdafcc (patch) | |
tree | eb8f97f6cf9fac31d7ab90388af232d51cc9c137 /src/render/RenderBuffer.cpp | |
parent | Merge pull request #1219 from withmorten/miami-ini (diff) | |
download | re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.tar re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.tar.gz re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.tar.bz2 re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.tar.lz re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.tar.xz re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.tar.zst re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.zip |
Diffstat (limited to 'src/render/RenderBuffer.cpp')
-rw-r--r-- | src/render/RenderBuffer.cpp | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/render/RenderBuffer.cpp b/src/render/RenderBuffer.cpp deleted file mode 100644 index 687cc76b..00000000 --- a/src/render/RenderBuffer.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "common.h" - -#include "RenderBuffer.h" - -int32 TempBufferVerticesStored; -int32 TempBufferIndicesStored; - -VertexBufferUnion TempVertexBuffer; -RwImVertexIndex TempBufferRenderIndexList[TEMPBUFFERINDEXSIZE]; - -int RenderBuffer::VerticesToBeStored; -int RenderBuffer::IndicesToBeStored; - -void -RenderBuffer::ClearRenderBuffer(void) -{ - TempBufferVerticesStored = 0; - TempBufferIndicesStored = 0; -} - -void -RenderBuffer::StartStoring(int numIndices, int numVertices, RwImVertexIndex **indexStart, RwIm3DVertex **vertexStart) -{ - if(TempBufferIndicesStored + numIndices >= TEMPBUFFERINDEXSIZE) - RenderStuffInBuffer(); - if(TempBufferVerticesStored + numVertices >= TEMPBUFFERVERTSIZE) - RenderStuffInBuffer(); - *indexStart = &TempBufferRenderIndexList[TempBufferIndicesStored]; - *vertexStart = &TempBufferRenderVertices[TempBufferVerticesStored]; - IndicesToBeStored = numIndices; - VerticesToBeStored = numVertices; -} - -void -RenderBuffer::StopStoring(void) -{ - int i; - for(i = TempBufferIndicesStored; i < TempBufferIndicesStored+IndicesToBeStored; i++) - TempBufferRenderIndexList[i] += TempBufferVerticesStored; - TempBufferIndicesStored += IndicesToBeStored; - TempBufferVerticesStored += VerticesToBeStored; -} - -void -RenderBuffer::RenderStuffInBuffer(void) -{ - if(TempBufferVerticesStored && RwIm3DTransform(TempBufferRenderVertices, TempBufferVerticesStored, nil, rwIM3D_VERTEXUV)){ - RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, TempBufferRenderIndexList, TempBufferIndicesStored); - RwIm3DEnd(); - } - ClearRenderBuffer(); -} |