Blender
V5.0
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.h
"
14
15
namespace
blender::gpu
{
16
class
Batch;
17
}
18
19
#define USE_GPU_PY_REFERENCES
20
21
extern
PyTypeObject
BPyGPUBatch_Type
;
22
23
#define BPyGPUBatch_Check(v) (Py_TYPE(v) == &BPyGPUBatch_Type)
24
25
struct
BPyGPUBatch
{
26
PyObject_VAR_HEAD
27
/* The batch is owned, we may support thin wrapped batches later. */
28
blender::gpu::Batch *
batch
;
29
#ifdef USE_GPU_PY_REFERENCES
30
/* Just to keep a user to prevent freeing buffers we're using. */
31
PyObject *
references
;
32
#endif
33
};
34
35
[[nodiscard]] PyObject *
BPyGPUBatch_CreatePyObject
(blender::gpu::Batch *
batch
)
ATTR_NONNULL
(1);
BLI_compiler_attrs.h
ATTR_NONNULL
#define ATTR_NONNULL(...)
Definition
BLI_compiler_attrs.h:25
batch
struct @021025263243242147216143265077100330027142264337::@225245033123204053237120173316075113304004012000 batch
BPyGPUBatch_Type
PyTypeObject BPyGPUBatch_Type
Definition
gpu_py_batch.cc:585
BPyGPUBatch_CreatePyObject
PyObject * BPyGPUBatch_CreatePyObject(blender::gpu::Batch *batch) ATTR_NONNULL(1)
Definition
gpu_py_batch.cc:659
blender::gpu
Definition
blf_internal_types.hh:32
BPyGPUBatch
Definition
gpu_py_batch.hh:25
BPyGPUBatch::references
PyObject * references
Definition
gpu_py_batch.hh:31
BPyGPUBatch::batch
PyObject_VAR_HEAD blender::gpu::Batch * batch
Definition
gpu_py_batch.hh:28
Generated on
for Blender by
doxygen
1.16.1