Blender V5.3
gpu_py_vertex_buffer.cc File Reference
#include <Python.h>
#include "GPU_vertex_buffer.hh"
#include "../generic/py_capi_utils.hh"
#include "../generic/python_compat.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.

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define PY_AS_NATIVE(ty_dst, py_as_native)
#define PY_AS_NATIVE(ty_dst, py_as_native)

Functions

Public API
PyObject * blender::BPyGPUVertBuf_CreatePyObject (gpu::VertBuf *buf)

Utility Functions

#define PYGPU_AS_NATIVE_SWITCH(attr)
static void blender::pygpu_fill_format_elem (void *data_dst_void, PyObject *py_src, const GPUVertAttr *attr)
static void blender::pygpu_fill_format_sequence (void *data_dst_void, PyObject *py_seq_fast, const GPUVertAttr *attr)
static bool blender::pygpu_vertbuf_fill_impl (gpu::VertBuf *vbo, uint data_id, PyObject *seq, const char *error_prefix)
static int blender::pygpu_vertbuf_fill (gpu::VertBuf *buf, int id, PyObject *py_seq_data, const char *error_prefix)

VertBuf Type

static PyMethodDef blender::pygpu_vertbuf__tp_methods []
PyTypeObject blender::BPyGPUVertBuf_Type
static PyObject * blender::pygpu_vertbuf__tp_new (PyTypeObject *, PyObject *args, PyObject *kwds)
 blender::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 | str\n" " :param data: Buffer or sequence of data that should be stored in the buffer\n" " :type data: collections.abc.Buffer | " "Sequence[float] | Sequence[int] | Sequence[Sequence[float]] | Sequence[Sequence[int]]\n")
static PyObject * blender::pygpu_vertbuf_attr_fill (BPyGPUVertBuf *self, PyObject *args, PyObject *kwds)
static void blender::pygpu_vertbuf__tp_dealloc (BPyGPUVertBuf *self)
 blender::PyDoc_STRVAR (pygpu_vertbuf__tp_doc, ".. class:: GPUVertBuf\n" "\n" " Contains a VBO.\n" "\n" " .. method:: __init__(format, len)\n" "\n" " :param format: Vertex format.\n" " :type format: :class:`gpu.types.GPUVertFormat`\n" " :param len: Amount of vertices that will fit into this buffer.\n" " :type len: int\n")

Detailed Description

  • Use bpygpu_ for local API.
  • Use BPyGPU for public API.

Definition in file gpu_py_vertex_buffer.cc.

Macro Definition Documentation

◆ PY_AS_NATIVE [1/2]

#define PY_AS_NATIVE ( ty_dst,
py_as_native )
Value:
ty_dst *data_dst = static_cast<ty_dst *>(data_dst_void); \
for (uint i = 0; i < len; i++) { \
data_dst[i] = py_as_native(value_fast_items[i]); \
} \
((void)0)
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
Definition math_dual.h:263

◆ PY_AS_NATIVE [2/2]

#define PY_AS_NATIVE ( ty_dst,
py_as_native )
Value:
{ \
ty_dst *data_dst = static_cast<ty_dst *>(data_dst_void); \
*data_dst = py_as_native(py_src); \
} \
((void)0)

◆ PYGPU_AS_NATIVE_SWITCH

#define PYGPU_AS_NATIVE_SWITCH ( attr)