acdemiralp / gl

Header-only C++17 wrapper for OpenGL 4.6 Core Profile.
Boost Software License 1.0
157 stars 11 forks source link

gl::vertex_array has no interface for glVertexAttribPointer function. #9

Closed Megaxela closed 6 years ago

acdemiralp commented 6 years ago

Hello Alex,

This is intentional since glVertexAttribPointer is succeeded by a combination of glVertexArrayVertexBuffer and glVertexArrayAttribFormat since DSA. It is not deprecated, but a better alternative exists.

You can instead use the following two for identical functionality:

vertex_array::set_vertex_buffer (GLuint binding_index, const buffer& buffer, GLintptr offset, GLsizei stride)
vertex_array::set_attribute_format (GLuint index, GLint size, GLenum type, bool normalized, GLuint relative_offset)