I'm trying to render a mesh as depth maps using pyrender
, in which it calls glBufferData
like this
glBufferData(
GL_ARRAY_BUFFER, FLOAT_SZ * len(vertex_data),
vertex_data, GL_STATIC_DRAW
)
However, it throws GL_INVALID_VALUE
when the second parameter FLOAT_SZ * len(vertex_data)
exceeds the range of GLsizeiptr
,
OpenGL.error.GLError: GLError(
err = 1281,
description = b'invalid value',
baseOperation = glBufferData,
pyArgs = (
GL_ARRAY_BUFFER,
2202722400,
array([ -9.20932 , 1.6728516, 499.41064 , ..., 1. ,
1. , 1. ], dtype=float32),
GL_STATIC_DRAW,
),
(Pdb) GLsizeiptr(2202722400)
c_int(-2092244896)
So is there any way to fix this error?