Support setup attrib description without a mesh object
This commit is contained in:
parent
a93715e16e
commit
b97e7bc26c
1 changed files with 10 additions and 0 deletions
|
|
@ -396,4 +396,14 @@ namespace psemek::gfx
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void setup(attribs_description const & attribs)
|
||||||
|
{
|
||||||
|
for (auto const & a : attribs.attribs)
|
||||||
|
{
|
||||||
|
gl::EnableVertexAttribArray(a.index);
|
||||||
|
gl::VertexAttribPointer(a.index, a.size, a.type, a.normalized, attribs.vertex_size, a.pointer);
|
||||||
|
gl::VertexAttribDivisor(a.index, a.divisor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue