diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-06 17:40:07 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-06 23:13:06 +0300 |
commit | 7ffff04e4900ca284519900d12bd1490e218c4f4 (patch) | |
tree | d148ee3c5c286a45bc33f521c2c606e47dd43968 /source/blender/python/gpu/gpu_py_batch.c | |
parent | 98fc3f263cf18a1222d7ffe7dc0e1c0a1fa47ecd (diff) |
GPUVertBuf: Make GPUVertBuf private to the GPU module
This is just a cleanup to isolate the internals of the vertbuf.
This adds some getters to avoid refactor of existing code.
Diffstat (limited to 'source/blender/python/gpu/gpu_py_batch.c')
-rw-r--r-- | source/blender/python/gpu/gpu_py_batch.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/python/gpu/gpu_py_batch.c b/source/blender/python/gpu/gpu_py_batch.c index bb7028c11ab..60b78b51890 100644 --- a/source/blender/python/gpu/gpu_py_batch.c +++ b/source/blender/python/gpu/gpu_py_batch.c @@ -141,11 +141,12 @@ static PyObject *bpygpu_Batch_vertbuf_add(BPyGPUBatch *self, BPyGPUVertBuf *py_b return NULL; } - if (self->batch->verts[0]->vertex_len != py_buf->buf->vertex_len) { + if (GPU_vertbuf_get_vertex_len(self->batch->verts[0]) != + GPU_vertbuf_get_vertex_len(py_buf->buf)) { PyErr_Format(PyExc_TypeError, "Expected %d length, got %d", - self->batch->verts[0]->vertex_len, - py_buf->buf->vertex_len); + GPU_vertbuf_get_vertex_len(self->batch->verts[0]), + GPU_vertbuf_get_vertex_len(py_buf->buf)); return NULL; } |