Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save OkiStuff/0680c66cfb30e523350eb6dd4204eba3 to your computer and use it in GitHub Desktop.
Save OkiStuff/0680c66cfb30e523350eb6dd4204eba3 to your computer and use it in GitHub Desktop.
OpenGL Special Vertex Attribute Pointer Functions

OpenGL Special Vertex Attribute Pointer Functions

The commonly used Vertex Attribute Pointer Function is the standard glVertexAttribPointer, however dispite supporting multiple types of inputs, it should only be used for floats.

It will attempt to cast your value to float and then back to the original type which will likely result in broken values.

Integers

You should use glVertexAttribIPointer

Doubles

You should use glVertexAttribLPointer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment