Merged the VertexBuffer and ArrayVertexBuffer classes.
TRAC# 22224
Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1579 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/VertexBuffer.cpp b/src/libGLESv2/renderer/VertexBuffer.cpp
index 226f38e..28e3342 100644
--- a/src/libGLESv2/renderer/VertexBuffer.cpp
+++ b/src/libGLESv2/renderer/VertexBuffer.cpp
@@ -29,6 +29,10 @@
ERR("Out of memory allocating a vertex buffer of size %lu.", size);
}
}
+
+ mBufferSize = size;
+ mWritePosition = 0;
+ mRequiredSpace = 0;
}
VertexBuffer::~VertexBuffer()
@@ -62,23 +66,12 @@
return mCurrentSerial++;
}
-ArrayVertexBuffer::ArrayVertexBuffer(rx::Renderer9 *renderer, std::size_t size, DWORD usageFlags) : VertexBuffer(renderer, size, usageFlags)
-{
- mBufferSize = size;
- mWritePosition = 0;
- mRequiredSpace = 0;
-}
-
-ArrayVertexBuffer::~ArrayVertexBuffer()
-{
-}
-
-void ArrayVertexBuffer::addRequiredSpace(UINT requiredSpace)
+void VertexBuffer::addRequiredSpace(UINT requiredSpace)
{
mRequiredSpace += requiredSpace;
}
-StreamingVertexBuffer::StreamingVertexBuffer(rx::Renderer9 *renderer, std::size_t initialSize) : ArrayVertexBuffer(renderer, initialSize, D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY)
+StreamingVertexBuffer::StreamingVertexBuffer(rx::Renderer9 *renderer, std::size_t initialSize) : VertexBuffer(renderer, initialSize, D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY)
{
}
@@ -145,7 +138,7 @@
mRequiredSpace = 0;
}
-StaticVertexBuffer::StaticVertexBuffer(rx::Renderer9 *renderer) : ArrayVertexBuffer(renderer, 0, D3DUSAGE_WRITEONLY)
+StaticVertexBuffer::StaticVertexBuffer(rx::Renderer9 *renderer) : VertexBuffer(renderer, 0, D3DUSAGE_WRITEONLY)
{
}