Commit d733cb2b authored by chili's avatar chili
Browse files

fix problem with vbuf init (vcount -> bufbytes)

parent ce1e5732
...@@ -259,6 +259,10 @@ namespace hw3dexp ...@@ -259,6 +259,10 @@ namespace hw3dexp
{ {
return buffer.size() / layout.Size(); return buffer.size() / layout.Size();
} }
size_t SizeBytes() const noexcept(!IS_DEBUG)
{
return buffer.size();
}
template<typename ...Params> template<typename ...Params>
void EmplaceBack( Params&&... params ) noexcept(!IS_DEBUG) void EmplaceBack( Params&&... params ) noexcept(!IS_DEBUG)
{ {
......
...@@ -35,7 +35,7 @@ public: ...@@ -35,7 +35,7 @@ public:
bd.Usage = D3D11_USAGE_DEFAULT; bd.Usage = D3D11_USAGE_DEFAULT;
bd.CPUAccessFlags = 0u; bd.CPUAccessFlags = 0u;
bd.MiscFlags = 0u; bd.MiscFlags = 0u;
bd.ByteWidth = UINT( vbuf.Size() ); bd.ByteWidth = UINT( vbuf.SizeBytes() );
bd.StructureByteStride = stride; bd.StructureByteStride = stride;
D3D11_SUBRESOURCE_DATA sd = {}; D3D11_SUBRESOURCE_DATA sd = {};
sd.pSysMem = vbuf.GetData(); sd.pSysMem = vbuf.GetData();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment