-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyGLM types do not support PyBUF_SIMPLE
#61
Comments
I'm not sure I understand what you're getting at.
It doesn't make sense to me for PyGLM to provide buffers with less complexity than PyGLM accepts any buffer requests that have at least the |
I guess I could add support for less complex buffer structures in case a program wants that. |
Sorry, I was rambling a bit trying to figure things out while learning in the process 😄 Yes it would definitely be nice to have support for less complex buffer structures so they can be used just like |
Works now. Thank you. |
It looks like a6c0f1f introduced a strides check, so |
I don't know why exactly I added that check back in. |
Removed checks for strides in mat_getbuffer and checks for non-fortran-contiguity in the remaining getbuffer methods. Should fix #61
Removed checks for strides in mat_getbuffer and checks for non-fortran-contiguity in the remaining getbuffer methods. Should fix #61
Great, thanks for the fix! |
Thanks! I just noticed this late last night when upgrading pyglm. Writing uniform data to shaders did not work any more in moderngl and arcade using the buffer protocol. |
Example from
mat_getbuffer
Most types (if not all) do pass the
PyBuffer_IsContiguous()
tests, so I assume all types have contiguous buffer data. Still, the various*_getbuffer
methods do not accept this flag.We discovered this issue when trying to set uniform or buffer data in moderngl.
Error output:
We obtain the buffer using:
This is acceptable when you just want to write contiguous to an opengl buffer and have no plans to keep the buffer reference or modify it.
More details here:
moderngl/moderngl#379
The text was updated successfully, but these errors were encountered: