summaryrefslogtreecommitdiff
path: root/examples/images
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-09-06 09:34:46 -0400
committerDavid Thompson <dthompson2@worcester.edu>2018-09-06 09:34:46 -0400
commit749adfc4101d11784bf8207c2f6cbe6b8638dd13 (patch)
treec7e003957331c9c84d53b97e1b23a1f36fa5c0ed /examples/images
parentb3f98892edacce79525523984cb72eba2473f9e6 (diff)
render: buffer: Fix pointer argument to glVertexAttribPointer.
This one was a doozy. Took me days to figure out why something wasn't rendering properly and this was the culprit! The last argument, the "pointer" argument, to glVertexAttribPointer is supposed to point to the byte offset to start reading data from the VBO. I thought this meant that I could pass a pointer to an integer that contained the offset. WRONG! The pointer value itself must encode that offset. You can see in the diff that I knew this code didn't work when the offset was 0, but somehow a null pointer worked and I just made that case work while leaving every other offset broken. The more I know! * chickadee/render/buffer.scm (apply-typed-buffer): Pass a pointer whose address is the byte offset of the buffer, rather than a pointer whose dereferenced value is an integer representing the byte offset.
Diffstat (limited to 'examples/images')
0 files changed, 0 insertions, 0 deletions