Rimio
Rimio

Reputation:

OpenGL vertex layout

The problem goes like this: if I have a vertex structure defined with only the position (3 floats), with a total size of 12 bytes, things work perfectly. However, if I try to use unsigned bytes or shorts for the position components (3 or 6 bytes per vertex) it crashes with an access violation at glDrawArrays. Any idea why?

Upvotes: 1

Views: 637

Answers (1)

Rimio
Rimio

Reputation:

Looks like I had to use unsigned types.

Upvotes: 1

Related Questions