Fix mesh attribute stride calculation
This commit is contained in:
parent
30744dadeb
commit
532ac6fdf5
1 changed files with 2 additions and 2 deletions
|
|
@ -157,7 +157,7 @@ namespace psemek::gfx
|
|||
}
|
||||
else
|
||||
{
|
||||
return sizeof(Attr);
|
||||
return sizeof(typename attrib_traits<Attr>::attrib_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ namespace psemek::gfx
|
|||
{
|
||||
static std::size_t setup()
|
||||
{
|
||||
std::size_t const stride = (0 + ... + attr_size<Attribs>());
|
||||
std::size_t const stride = attr_size<Attr1>() + (0 + ... + attr_size<Attribs>());
|
||||
setup_impl(0, 0, stride);
|
||||
return stride;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue