Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/gpu/gpu_py_vertex_buffer.c
| Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Lines | static PyObject *pygpu_vertbuf__tp_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject *kwds) | ||||
| return BPyGPUVertBuf_CreatePyObject(vbo); | return BPyGPUVertBuf_CreatePyObject(vbo); | ||||
| } | } | ||||
| PyDoc_STRVAR(pygpu_vertbuf_attr_fill_doc, | PyDoc_STRVAR(pygpu_vertbuf_attr_fill_doc, | ||||
| ".. method:: attr_fill(id, data)\n" | ".. method:: attr_fill(id, data)\n" | ||||
| "\n" | "\n" | ||||
| " Insert data into the buffer for a single attribute.\n" | " Insert data into the buffer for a single attribute.\n" | ||||
| "\n" | "\n" | ||||
| " :param id: Either the name or the id of the attribute.\n" | " :arg id: Either the name or the id of the attribute.\n" | ||||
| " :type id: int or str\n" | " :type id: int or str\n" | ||||
| " :param data: Sequence of data that should be stored in the buffer\n" | " :arg data: Sequence of data that should be stored in the buffer\n" | ||||
| " :type data: sequence of floats, ints, vectors or matrices\n"); | " :type data: sequence of floats, ints, vectors or matrices\n"); | ||||
| static PyObject *pygpu_vertbuf_attr_fill(BPyGPUVertBuf *self, PyObject *args, PyObject *kwds) | static PyObject *pygpu_vertbuf_attr_fill(BPyGPUVertBuf *self, PyObject *args, PyObject *kwds) | ||||
| { | { | ||||
| PyObject *data; | PyObject *data; | ||||
| PyObject *identifier; | PyObject *identifier; | ||||
| static const char *_keywords[] = {"id", "data", NULL}; | static const char *_keywords[] = {"id", "data", NULL}; | ||||
| static _PyArg_Parser _parser = { | static _PyArg_Parser _parser = { | ||||
| ▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | static void pygpu_vertbuf__tp_dealloc(BPyGPUVertBuf *self) | ||||
| Py_TYPE(self)->tp_free(self); | Py_TYPE(self)->tp_free(self); | ||||
| } | } | ||||
| PyDoc_STRVAR(pygpu_vertbuf__tp_doc, | PyDoc_STRVAR(pygpu_vertbuf__tp_doc, | ||||
| ".. class:: GPUVertBuf(format, len)\n" | ".. class:: GPUVertBuf(format, len)\n" | ||||
| "\n" | "\n" | ||||
| " Contains a VBO.\n" | " Contains a VBO.\n" | ||||
| "\n" | "\n" | ||||
| " :param format: Vertex format.\n" | " :arg format: Vertex format.\n" | ||||
| " :type buf: :class:`gpu.types.GPUVertFormat`\n" | " :type format: :class:`gpu.types.GPUVertFormat`\n" | ||||
| " :param len: Amount of vertices that will fit into this buffer.\n" | " :arg len: Amount of vertices that will fit into this buffer.\n" | ||||
| " :type type: `int`\n"); | " :type len: int\n"); | ||||
| PyTypeObject BPyGPUVertBuf_Type = { | PyTypeObject BPyGPUVertBuf_Type = { | ||||
| PyVarObject_HEAD_INIT(NULL, 0).tp_name = "GPUVertBuf", | PyVarObject_HEAD_INIT(NULL, 0).tp_name = "GPUVertBuf", | ||||
| .tp_basicsize = sizeof(BPyGPUVertBuf), | .tp_basicsize = sizeof(BPyGPUVertBuf), | ||||
| .tp_dealloc = (destructor)pygpu_vertbuf__tp_dealloc, | .tp_dealloc = (destructor)pygpu_vertbuf__tp_dealloc, | ||||
| .tp_flags = Py_TPFLAGS_DEFAULT, | .tp_flags = Py_TPFLAGS_DEFAULT, | ||||
| .tp_doc = pygpu_vertbuf__tp_doc, | .tp_doc = pygpu_vertbuf__tp_doc, | ||||
| .tp_methods = pygpu_vertbuf__tp_methods, | .tp_methods = pygpu_vertbuf__tp_methods, | ||||
| .tp_new = pygpu_vertbuf__tp_new, | .tp_new = pygpu_vertbuf__tp_new, | ||||
| Show All 19 Lines | |||||