glGetBufferSubData odd behavior
Brought to you by:
mcfletch
pyopengl version
Name: PyOpenGL
Version: 3.1.0
Location: /Library/Python/2.7/site-packages
When performing glGetBufferSubData on MacOS some weird behavior appears.
One can convert the uint8 data to float32 by using some numpy conversions:
glBindBuffer(GL_ARRAY_BUFFER, vbo)
raw_unit8_data = glGetBufferSubData(GL_ARRAY_BUFFER, 0, 6*4)
glBindBuffer(GL_ARRAY_BUFFER, 0)
print(np.fromstring(raw_unit8_data.tostring(), dtype='<f4'))
I documented this problem on Stackoverflow:
http://stackoverflow.com/questions/34637222/glgetbuffersubdata-pyopengl-random-result-and-segfault