X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FVertexArray.inl;h=36c8fc26313157b5c52b0f91e6329d43be0f7bee;hb=f071bb512a09cece895e65ca48eba2a7155d6593;hp=1b532b7d4fd9fa8d098dec36e5dad7155067a7af;hpb=1e93bfb5089737f6b6d8fdd2f17260944fca44b2;p=blank.git diff --git a/src/graphics/VertexArray.inl b/src/graphics/VertexArray.inl index 1b532b7..36c8fc2 100644 --- a/src/graphics/VertexArray.inl +++ b/src/graphics/VertexArray.inl @@ -48,11 +48,11 @@ void VertexArray::Bind() const noexcept { template template -void VertexArray::PushAttribute(std::size_t which, const std::vector &data) noexcept { +void VertexArray::PushAttribute(std::size_t which, const std::vector &data, bool normalized) noexcept { BindAttribute(which); AttributeData(data); EnableAttribute(which); - AttributePointer(which); + AttributePointer(which, normalized); } template @@ -75,12 +75,12 @@ void VertexArray::AttributeData(const std::vector &buf) noexcept { template template -void VertexArray::AttributePointer(std::size_t which) noexcept { +void VertexArray::AttributePointer(std::size_t which, bool normalized) noexcept { glVertexAttribPointer( which, // program location gl_traits::size, // element size gl_traits::type, // element type - GL_FALSE, // normalize to [-1,1] or [0,1] for unsigned types + normalized, // normalize to [-1,1] or [0,1] for unsigned types 0, // stride nullptr // offset );