Blender  V3.3
gpu_py_element.c File Reference
#include <Python.h>
#include "GPU_index_buffer.h"
#include "BLI_math.h"
#include "MEM_guardedalloc.h"
#include "../generic/py_capi_utils.h"
#include "gpu_py.h"
#include "gpu_py_element.h"

Go to the source code of this file.

Functions

Public API
PyObject * BPyGPUIndexBuf_CreatePyObject (GPUIndexBuf *elem)
 

IndexBuf Type

PyTypeObject BPyGPUIndexBuf_Type
 
static PyObject * pygpu_IndexBuf__tp_new (PyTypeObject *UNUSED(type), PyObject *args, PyObject *kwds)
 
static void pygpu_IndexBuf__tp_dealloc (BPyGPUIndexBuf *self)
 
 PyDoc_STRVAR (pygpu_IndexBuf__tp_doc, ".. class:: GPUIndexBuf(type, seq)\n" "\n" " Contains an index buffer.\n" "\n" " :arg type: The primitive type this index buffer is composed of.\n" " Possible values are `POINTS`, `LINES`, `TRIS` and `LINE_STRIP_ADJ`.\n" " :type type: str\n" " :param seq: Indices this index buffer will contain.\n" " Whether a 1D or 2D sequence is required depends on the type.\n" " Optionally the sequence can support the buffer protocol.\n" " :type seq: 1D or 2D sequence\n")
 

Detailed Description

Definition in file gpu_py_element.c.

Function Documentation

◆ BPyGPUIndexBuf_CreatePyObject()

PyObject* BPyGPUIndexBuf_CreatePyObject ( GPUIndexBuf elem)

Definition at line 202 of file gpu_py_element.c.

References BPyGPUIndexBuf_Type.

Referenced by pygpu_IndexBuf__tp_new().

◆ PyDoc_STRVAR()

PyDoc_STRVAR ( pygpu_IndexBuf__tp_doc  ,
".. class:: GPUIndexBuf(type, seq)\n" "\n" " Contains an index buffer.\n" "\n" " :arg type: The primitive type this index buffer is composed of.\n" " Possible values are `POINTS`  ,
`LINES`  ,
`TRIS` and `LINE_STRIP_ADJ`.\n" " :type type:str\n" " :param seq:Indices this index buffer will contain.\n" " Whether a 1D or 2D sequence is required depends on the type.\n" " Optionally the sequence can support the buffer protocol.\n" " :type seq:1D or 2D sequence\n"   
)

◆ pygpu_IndexBuf__tp_dealloc()

static void pygpu_IndexBuf__tp_dealloc ( BPyGPUIndexBuf self)
static

Definition at line 169 of file gpu_py_element.c.

References GPU_indexbuf_discard(), and self.

◆ pygpu_IndexBuf__tp_new()

static PyObject* pygpu_IndexBuf__tp_new ( PyTypeObject *  UNUSEDtype,
PyObject *  args,
PyObject *  kwds 
)
static

Variable Documentation

◆ BPyGPUIndexBuf_Type

PyTypeObject BPyGPUIndexBuf_Type
Initial value:
= {
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "GPUIndexBuf",
.tp_basicsize = sizeof(BPyGPUIndexBuf),
.tp_dealloc = (destructor)pygpu_IndexBuf__tp_dealloc,
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_doc = pygpu_IndexBuf__tp_doc,
}
static void pygpu_IndexBuf__tp_dealloc(BPyGPUIndexBuf *self)
static PyObject * pygpu_IndexBuf__tp_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject *kwds)
struct BPyGPUIndexBuf BPyGPUIndexBuf

Definition at line 187 of file gpu_py_element.c.

Referenced by bpygpu_types_init(), BPyGPUIndexBuf_CreatePyObject(), and pygpu_batch__tp_new().