Blender V4.3
gpu_py_batch.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "BLI_compiler_attrs.h"
12
13namespace blender::gpu {
14class Batch;
15}
16
17#define USE_GPU_PY_REFERENCES
18
19extern PyTypeObject BPyGPUBatch_Type;
20
21#define BPyGPUBatch_Check(v) (Py_TYPE(v) == &BPyGPUBatch_Type)
22
24 PyObject_VAR_HEAD
25 /* The batch is owned, we may support thin wrapped batches later. */
26 blender::gpu::Batch *batch;
27#ifdef USE_GPU_PY_REFERENCES
28 /* Just to keep a user to prevent freeing buffers we're using. */
29 PyObject *references;
30#endif
31};
32
33PyObject *BPyGPUBatch_CreatePyObject(blender::gpu::Batch *batch) ATTR_NONNULL(1);
#define ATTR_NONNULL(...)
struct @620::@622 batch
PyObject * BPyGPUBatch_CreatePyObject(blender::gpu::Batch *batch) ATTR_NONNULL(1)
PyTypeObject BPyGPUBatch_Type
PyObject * references
PyObject_VAR_HEAD blender::gpu::Batch * batch