diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/opengl/gl_vertex_array.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/gpu/opengl/gl_vertex_array.cc b/source/blender/gpu/opengl/gl_vertex_array.cc index 14a7b4deb7d..ed6699e51f3 100644 --- a/source/blender/gpu/opengl/gl_vertex_array.cc +++ b/source/blender/gpu/opengl/gl_vertex_array.cc @@ -62,7 +62,8 @@ static uint16_t vbo_bind(const ShaderInterface *interface, offset = a->offset; } - const GLvoid *pointer = (const GLubyte *)0 + offset + v_first * stride; + /* This is in fact an offset in memory. */ + const GLvoid *pointer = (const GLubyte *)(intptr_t)(offset + v_first * stride); const GLenum type = to_gl(static_cast<GPUVertCompType>(a->comp_type)); for (uint n_idx = 0; n_idx < a->name_len; n_idx++) { @@ -168,4 +169,4 @@ void GLVertArray::update_bindings(const GLuint vao, /** \} */ -} // namespace blender::gpu
\ No newline at end of file +} // namespace blender::gpu |