Blender  V3.3
gpu_py_batch.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
9 #include "BLI_compiler_attrs.h"
10 
11 #define USE_GPU_PY_REFERENCES
12 
13 extern PyTypeObject BPyGPUBatch_Type;
14 
15 #define BPyGPUBatch_Check(v) (Py_TYPE(v) == &BPyGPUBatch_Type)
16 
17 typedef struct BPyGPUBatch {
18  PyObject_VAR_HEAD
19  /* The batch is owned, we may support thin wrapped batches later. */
20  struct GPUBatch *batch;
21 #ifdef USE_GPU_PY_REFERENCES
22  /* Just to keep a user to prevent freeing buf's we're using */
23  PyObject *references;
24 #endif
26 
#define ATTR_NONNULL(...)
GPUBatch
Definition: GPU_batch.h:78
struct @653::@655 batch
struct BPyGPUBatch BPyGPUBatch
PyObject * BPyGPUBatch_CreatePyObject(struct GPUBatch *batch) ATTR_NONNULL(1)
Definition: gpu_py_batch.c:329
PyTypeObject BPyGPUBatch_Type
Definition: gpu_py_batch.c:307
PyObject * references
Definition: gpu_py_batch.h:23
PyObject_VAR_HEAD struct GPUBatch * batch
Definition: gpu_py_batch.h:20