Blender
V5.3
source
blender
python
gpu
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
8
9
#pragma once
10
11
#include <Python.h>
12
13
#include "
BLI_compiler_attrs.hh
"
14
15
namespace
blender
{
16
17
namespace
gpu
{
18
class
Batch;
19
}
20
21
#define USE_GPU_PY_REFERENCES
22
23
extern
PyTypeObject
BPyGPUBatch_Type
;
24
25
#define BPyGPUBatch_Check(v) (Py_TYPE(v) == &BPyGPUBatch_Type)
26
27
struct
BPyGPUBatch
{
28
PyObject_HEAD
29
/* The batch is owned, we may support thin wrapped batches later. */
30
gpu::Batch *
batch
;
31
#ifdef USE_GPU_PY_REFERENCES
32
/* Just to keep a user to prevent freeing buffers we're using. */
33
PyObject *
references
;
34
#endif
35
};
36
37
[[nodiscard]] PyObject *
BPyGPUBatch_CreatePyObject
(gpu::Batch *batch)
ATTR_NONNULL
(1);
38
39
}
// namespace blender
BLI_compiler_attrs.hh
blender::gpu
Definition
blf_internal_types.hh:35
blender
BMesh Iterators.
Definition
ANIM_action.hh:30
blender::BPyGPUBatch_Type
PyTypeObject BPyGPUBatch_Type
Definition
gpu_py_batch.cc:637
blender::ATTR_NONNULL
void ATTR_NONNULL(1, 2)
blender::BPyGPUBatch_CreatePyObject
PyObject * BPyGPUBatch_CreatePyObject(gpu::Batch *batch)
Definition
gpu_py_batch.cc:711
blender::BPyGPUBatch
Definition
gpu_py_batch.hh:27
blender::BPyGPUBatch::references
PyObject * references
Definition
gpu_py_batch.hh:33
blender::BPyGPUBatch::batch
PyObject_HEAD gpu::Batch * batch
Definition
gpu_py_batch.hh:30
Generated on
for Blender by
doxygen
1.18.0