Prepare FFlatVertexBuffer for removal
This commit is contained in:
parent
1fe5b8e26f
commit
154cb2e967
13 changed files with 102 additions and 73 deletions
|
|
@ -128,10 +128,3 @@ void FFlatVertexBuffer::Copy(int start, int count)
|
|||
|
||||
mVertexBuffer = old;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
||||
std::pair<FFlatVertex*, unsigned int> FRenderState::AllocVertices(unsigned int count)
|
||||
{
|
||||
return screen->mVertexData->AllocVertices(count);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,12 @@ MeshBuilder::MeshBuilder()
|
|||
mVertices = screen->mVertexData->vbo_shadowdata;
|
||||
}
|
||||
|
||||
void MeshBuilder::SetShadowData(const TArray<FFlatVertex>& vertices, const TArray<uint32_t>& indexes)
|
||||
{
|
||||
mVertices = vertices;
|
||||
mIndexes = indexes;
|
||||
}
|
||||
|
||||
void MeshBuilder::Draw(int dt, int index, int count, bool apply)
|
||||
{
|
||||
if (apply)
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ public:
|
|||
|
||||
// Vertices
|
||||
std::pair<FFlatVertex*, unsigned int> AllocVertices(unsigned int count) override;
|
||||
void SetShadowData(const TArray<FFlatVertex>& vertices, const TArray<uint32_t>& indexes) override;
|
||||
void UpdateShadowData(unsigned int index, const FFlatVertex* vertices, unsigned int count) { }
|
||||
|
||||
// Buffers
|
||||
int SetViewpoint(const HWViewpointUniforms& vp) override { return 0; }
|
||||
|
|
@ -115,6 +117,7 @@ private:
|
|||
DrawLists* mDrawLists = nullptr;
|
||||
|
||||
TArray<FFlatVertex> mVertices;
|
||||
TArray<uint32_t> mIndexes;
|
||||
int mDepthFunc = 0;
|
||||
|
||||
VSMatrix mTextureMatrix = VSMatrix::identity();
|
||||
|
|
|
|||
|
|
@ -734,7 +734,9 @@ public:
|
|||
// API-dependent render interface
|
||||
|
||||
// Vertices
|
||||
virtual std::pair<FFlatVertex*, unsigned int> AllocVertices(unsigned int count);
|
||||
virtual std::pair<FFlatVertex*, unsigned int> AllocVertices(unsigned int count) = 0;
|
||||
virtual void SetShadowData(const TArray<FFlatVertex>& vertices, const TArray<uint32_t>& indexes) = 0;
|
||||
virtual void UpdateShadowData(unsigned int index, const FFlatVertex* vertices, unsigned int count) = 0;
|
||||
|
||||
// Buffers
|
||||
virtual int SetViewpoint(const HWViewpointUniforms& vp) = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue