|
Blender
V3.3
|
#include <Python.h>#include "GPU_vertex_buffer.h"#include "BLI_math.h"#include "MEM_guardedalloc.h"#include "../generic/py_capi_utils.h"#include "../generic/python_utildefines.h"#include "gpu_py_vertex_buffer.h"#include "gpu_py_vertex_format.h"Go to the source code of this file.
Macros | |
| #define | PY_AS_NATIVE(ty_dst, py_as_native) |
| #define | PY_AS_NATIVE(ty_dst, py_as_native) |
Functions | |
Public API | |
| PyObject * | BPyGPUVertBuf_CreatePyObject (GPUVertBuf *buf) |
Utility Functions | |
| #define | PYGPU_AS_NATIVE_SWITCH(attr) |
| static void | pygpu_fill_format_elem (void *data_dst_void, PyObject *py_src, const GPUVertAttr *attr) |
| static void | pygpu_fill_format_sequence (void *data_dst_void, PyObject *py_seq_fast, const GPUVertAttr *attr) |
| static bool | pygpu_vertbuf_fill_impl (GPUVertBuf *vbo, uint data_id, PyObject *seq, const char *error_prefix) |
| static int | pygpu_vertbuf_fill (GPUVertBuf *buf, int id, PyObject *py_seq_data, const char *error_prefix) |
VertBuf Type | |
| static struct PyMethodDef | pygpu_vertbuf__tp_methods [] |
| PyTypeObject | BPyGPUVertBuf_Type |
| static PyObject * | pygpu_vertbuf__tp_new (PyTypeObject *UNUSED(type), PyObject *args, PyObject *kwds) |
| PyDoc_STRVAR (pygpu_vertbuf_attr_fill_doc, ".. method:: attr_fill(id, data)\n" "\n" " Insert data into the buffer for a single attribute.\n" "\n" " :param id: Either the name or the id of the attribute.\n" " :type id: int or str\n" " :param data: Sequence of data that should be stored in the buffer\n" " :type data: sequence of floats, ints, vectors or matrices\n") | |
| static PyObject * | pygpu_vertbuf_attr_fill (BPyGPUVertBuf *self, PyObject *args, PyObject *kwds) |
| static void | pygpu_vertbuf__tp_dealloc (BPyGPUVertBuf *self) |
| PyDoc_STRVAR (pygpu_vertbuf__tp_doc, ".. class:: GPUVertBuf(format, len)\n" "\n" " Contains a VBO.\n" "\n" " :param format: Vertex format.\n" " :type buf: :class:`gpu.types.GPUVertFormat`\n" " :param len: Amount of vertices that will fit into this buffer.\n" " :type type: `int`\n") | |
bpygpu_ for local API.BPyGPU for public API. Definition in file gpu_py_vertex_buffer.c.
| #define PY_AS_NATIVE | ( | ty_dst, | |
| py_as_native | |||
| ) |
| #define PY_AS_NATIVE | ( | ty_dst, | |
| py_as_native | |||
| ) |
| #define PYGPU_AS_NATIVE_SWITCH | ( | attr | ) |
Definition at line 28 of file gpu_py_vertex_buffer.c.
| PyObject* BPyGPUVertBuf_CreatePyObject | ( | GPUVertBuf * | buf | ) |
Definition at line 350 of file gpu_py_vertex_buffer.c.
References BPyGPUVertBuf_Type.
Referenced by pygpu_vertbuf__tp_new().
| PyDoc_STRVAR | ( | pygpu_vertbuf__tp_doc | , |
| ".. class:: GPUVertBuf(format, len)\n" "\n" " Contains a VBO.\n" "\n" " :param format: Vertex format.\n" " :type buf: :class:`gpu.types.GPUVertFormat`\n" " :param len: Amount of vertices that will fit into this buffer.\n" " :type type: `int`\n" | |||
| ) |
| PyDoc_STRVAR | ( | pygpu_vertbuf_attr_fill_doc | , |
| ".. method:: attr_fill(id, data)\n" "\n" " Insert data into the buffer for a single attribute.\n" "\n" " :param id: Either the name or the id of the attribute.\n" " :type id: int or str\n" " :param data: Sequence of data that should be stored in the buffer\n" " :type data: sequence of | floats, | ||
| ints | , | ||
| vectors or matrices\n" | |||
| ) |
|
static |
Definition at line 65 of file gpu_py_vertex_buffer.c.
References PYGPU_AS_NATIVE_SWITCH.
Referenced by pygpu_vertbuf_fill_impl().
|
static |
Args are constants, so range checks will be optimized out if they're no-op's.
Definition at line 80 of file gpu_py_vertex_buffer.c.
References GPUVertAttr::comp_len, len, and PYGPU_AS_NATIVE_SWITCH.
Referenced by pygpu_vertbuf_fill_impl().
|
static |
Definition at line 319 of file gpu_py_vertex_buffer.c.
References GPU_vertbuf_discard(), and self.
|
static |
Definition at line 231 of file gpu_py_vertex_buffer.c.
References BPyGPUVertBuf_CreatePyObject(), BPyGPUVertFormat_Type, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), len, NULL, and params.
|
static |
Definition at line 268 of file gpu_py_vertex_buffer.c.
|
static |
Definition at line 203 of file gpu_py_vertex_buffer.c.
References GPU_vertbuf_get_data(), GPU_vertbuf_get_format(), NULL, and pygpu_vertbuf_fill_impl().
|
static |
Definition at line 106 of file gpu_py_vertex_buffer.c.
References GPUVertFormat::attrs, GPUVertAttr::comp_len, data, GPU_vertbuf_attr_fill_stride(), GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_get_format(), GPU_vertbuf_get_vertex_len(), GPU_vertbuf_raw_step(), if(), NULL, pygpu_fill_format_elem(), and pygpu_fill_format_sequence().
Referenced by pygpu_vertbuf_fill().
| PyTypeObject BPyGPUVertBuf_Type |
Definition at line 334 of file gpu_py_vertex_buffer.c.
Referenced by bpygpu_types_init(), BPyGPUVertBuf_CreatePyObject(), and pygpu_batch__tp_new().
|
static |
Definition at line 268 of file gpu_py_vertex_buffer.c.