|
Blender V4.3
|
#include <Python.h>#include "GPU_vertex_buffer.hh"#include "MEM_guardedalloc.h"#include "../generic/py_capi_utils.hh"#include "../generic/python_compat.hh"#include "../generic/python_utildefines.hh"#include "gpu_py.hh"#include "gpu_py_vertex_buffer.hh"#include "gpu_py_vertex_format.hh"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 (blender::gpu::VertBuf *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 (blender::gpu::VertBuf *vbo, uint data_id, PyObject *seq, const char *error_prefix) |
| static int | pygpu_vertbuf_fill (blender::gpu::VertBuf *buf, int id, PyObject *py_seq_data, const char *error_prefix) |
VertBuf Type | |
| static PyMethodDef | pygpu_vertbuf__tp_methods [] |
| PyTypeObject | BPyGPUVertBuf_Type |
| static PyObject * | pygpu_vertbuf__tp_new (PyTypeObject *, 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" " :arg id: Either the name or the id of the attribute.\n" " :type id: int | str\n" " :arg data: Buffer or sequence of data that should be stored in the buffer\n" " :type data: Buffer | " "Sequence[float] | Sequence[int] | Sequence[Sequence[float]] | Sequence[Sequence[int]]\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" " :arg format: Vertex format.\n" " :type format: :class:`gpu.types.GPUVertFormat`\n" " :arg len: Amount of vertices that will fit into this buffer.\n" " :type len: int\n") | |
bpygpu_ for local API.BPyGPU for public API. Definition in file gpu_py_vertex_buffer.cc.
| #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 30 of file gpu_py_vertex_buffer.cc.
Referenced by pygpu_fill_format_elem(), and pygpu_fill_format_sequence().
| PyObject * BPyGPUVertBuf_CreatePyObject | ( | blender::gpu::VertBuf * | buf | ) |
Definition at line 413 of file gpu_py_vertex_buffer.cc.
References BPyGPUVertBuf_Type, and self.
Referenced by pygpu_vertbuf__tp_new().
| PyDoc_STRVAR | ( | pygpu_vertbuf__tp_doc | , |
| ".. class:: GPUVertBuf(format, len)\n" "\n" " Contains a VBO.\n" "\n" " :arg format: Vertex format.\n" " :type format: :class:`gpu.types.GPUVertFormat`\n" " :arg len: Amount of vertices that will fit into this buffer.\n" " :type len: 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" " :arg id: Either the name or the id of the attribute.\n" " :type id: int | str\n" " :arg data: Buffer or sequence of data that should be stored in the buffer\n" " :type data: Buffer | " "Sequence | Sequence | Sequence] | Sequence]\n" | [float][int][Sequence[float][Sequence[int] ) |
|
static |
Definition at line 67 of file gpu_py_vertex_buffer.cc.
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 82 of file gpu_py_vertex_buffer.cc.
References GPUVertAttr::comp_len, len, and PYGPU_AS_NATIVE_SWITCH.
Referenced by pygpu_vertbuf_fill_impl().
|
static |
Definition at line 338 of file gpu_py_vertex_buffer.cc.
References GPU_vertbuf_discard(), and self.
|
static |
Definition at line 233 of file gpu_py_vertex_buffer.cc.
References BPYGPU_IS_INIT_OR_ERROR_OBJ, BPyGPUVertBuf_CreatePyObject(), BPyGPUVertFormat_Type, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), len, params, and PY_ARG_PARSER_HEAD_COMPAT.
|
static |
Definition at line 277 of file gpu_py_vertex_buffer.cc.
References data, GPU_vertbuf_get_format(), GPU_vertformat_attr_id_get(), PY_ARG_PARSER_HEAD_COMPAT, pygpu_vertbuf_fill(), and self.
|
static |
Definition at line 205 of file gpu_py_vertex_buffer.cc.
References blender::gpu::VertBuf::data(), GPU_vertbuf_get_format(), and pygpu_vertbuf_fill_impl().
Referenced by pygpu_vertbuf_attr_fill().
|
static |
Definition at line 108 of file gpu_py_vertex_buffer.cc.
References GPUVertFormat::attrs, GPUVertAttr::comp_len, GPU_vertbuf_attr_fill_stride(), GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_get_format(), GPU_vertbuf_get_vertex_len(), GPU_vertbuf_raw_step(), pygpu_fill_format_elem(), and pygpu_fill_format_sequence().
Referenced by pygpu_vertbuf_fill().
| PyTypeObject BPyGPUVertBuf_Type |
Definition at line 355 of file gpu_py_vertex_buffer.cc.
Referenced by bpygpu_types_init(), BPyGPUVertBuf_CreatePyObject(), and pygpu_batch__tp_new().
|
static |
Definition at line 326 of file gpu_py_vertex_buffer.cc.