Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Clark Lin
hw3d
Commits
d733cb2b
Commit
d733cb2b
authored
May 14, 2019
by
chili
Browse files
fix problem with vbuf init (vcount -> bufbytes)
parent
ce1e5732
Changes
2
Show whitespace changes
Inline
Side-by-side
hw3d/Vertex.h
View file @
d733cb2b
...
...
@@ -259,6 +259,10 @@ namespace hw3dexp
{
return
buffer
.
size
()
/
layout
.
Size
();
}
size_t
SizeBytes
()
const
noexcept
(
!
IS_DEBUG
)
{
return
buffer
.
size
();
}
template
<
typename
...
Params
>
void
EmplaceBack
(
Params
&&
...
params
)
noexcept
(
!
IS_DEBUG
)
{
...
...
hw3d/VertexBuffer.h
View file @
d733cb2b
...
...
@@ -35,7 +35,7 @@ public:
bd
.
Usage
=
D3D11_USAGE_DEFAULT
;
bd
.
CPUAccessFlags
=
0u
;
bd
.
MiscFlags
=
0u
;
bd
.
ByteWidth
=
UINT
(
vbuf
.
Size
()
);
bd
.
ByteWidth
=
UINT
(
vbuf
.
Size
Bytes
()
);
bd
.
StructureByteStride
=
stride
;
D3D11_SUBRESOURCE_DATA
sd
=
{};
sd
.
pSysMem
=
vbuf
.
GetData
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment