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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user