Blender
V5.3
source
blender
python
gpu
gpu_py_types.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
11
12
#include <Python.h>
13
14
#include "
gpu_py_matrix.hh
"
15
#include "
gpu_py_offscreen.hh
"
16
#include "
gpu_py_types.hh
"
/* own include */
17
18
namespace
blender
{
19
20
/* -------------------------------------------------------------------- */
23
24
static
PyModuleDef
pygpu_types_module_def
= {
25
/*m_base*/
PyModuleDef_HEAD_INIT
,
26
/*m_name*/
"gpu.types"
,
27
/*m_doc*/
nullptr
,
28
/*m_size*/
0,
29
/*m_methods*/
nullptr
,
30
/*m_slots*/
nullptr
,
31
/*m_traverse*/
nullptr
,
32
/*m_clear*/
nullptr
,
33
/*m_free*/
nullptr
,
34
};
35
36
PyObject *
bpygpu_types_init
()
37
{
38
if
(PyType_Ready(&
BPyGPU_BufferType
) < 0) {
39
return
nullptr
;
40
}
41
if
(PyType_Ready(&
BPyGPUVertFormat_Type
) < 0) {
42
return
nullptr
;
43
}
44
if
(PyType_Ready(&
BPyGPUVertBuf_Type
) < 0) {
45
return
nullptr
;
46
}
47
if
(PyType_Ready(&
BPyGPUIndexBuf_Type
) < 0) {
48
return
nullptr
;
49
}
50
if
(PyType_Ready(&
BPyGPUBatch_Type
) < 0) {
51
return
nullptr
;
52
}
53
if
(PyType_Ready(&
BPyGPUOffScreen_Type
) < 0) {
54
return
nullptr
;
55
}
56
if
(PyType_Ready(&
BPyGPUShader_Type
) < 0) {
57
return
nullptr
;
58
}
59
if
(PyType_Ready(&
BPyGPUTexture_Type
) < 0) {
60
return
nullptr
;
61
}
62
if
(PyType_Ready(&
BPyGPUFrameBuffer_Type
) < 0) {
63
return
nullptr
;
64
}
65
if
(PyType_Ready(&
BPyGPUUniformBuf_Type
) < 0) {
66
return
nullptr
;
67
}
68
if
(PyType_Ready(&
BPyGPUStorageBuf_Type
) < 0) {
69
return
nullptr
;
70
}
71
if
(PyType_Ready(&
BPyGPUShaderCreateInfo_Type
) < 0) {
72
return
nullptr
;
73
}
74
if
(PyType_Ready(&
BPyGPUStageInterfaceInfo_Type
) < 0) {
75
return
nullptr
;
76
}
77
if
(PyType_Ready(&
PyGPUMatrixStackContext_Type
) < 0) {
78
return
nullptr
;
79
}
80
if
(PyType_Ready(&
PyGPUOffscreenStackContext_Type
) < 0) {
81
return
nullptr
;
82
}
83
if
(PyType_Ready(&
BPyGPU_DeviceType
) < 0) {
84
return
nullptr
;
85
}
86
87
PyObject *submodule = PyModule_Create(&
pygpu_types_module_def
);
88
89
PyModule_AddType(submodule, &
BPyGPU_BufferType
);
90
PyModule_AddType(submodule, &
BPyGPUVertFormat_Type
);
91
PyModule_AddType(submodule, &
BPyGPUVertBuf_Type
);
92
PyModule_AddType(submodule, &
BPyGPUIndexBuf_Type
);
93
PyModule_AddType(submodule, &
BPyGPUBatch_Type
);
94
PyModule_AddType(submodule, &
BPyGPUOffScreen_Type
);
95
PyModule_AddType(submodule, &
BPyGPUShader_Type
);
96
PyModule_AddType(submodule, &
BPyGPUTexture_Type
);
97
PyModule_AddType(submodule, &
BPyGPUFrameBuffer_Type
);
98
PyModule_AddType(submodule, &
BPyGPUUniformBuf_Type
);
99
PyModule_AddType(submodule, &
BPyGPUStorageBuf_Type
);
100
PyModule_AddType(submodule, &
BPyGPUShaderCreateInfo_Type
);
101
PyModule_AddType(submodule, &
BPyGPUStageInterfaceInfo_Type
);
102
PyModule_AddType(submodule, &
PyGPUMatrixStackContext_Type
);
103
PyModule_AddType(submodule, &
PyGPUOffscreenStackContext_Type
);
104
PyModule_AddType(submodule, &
BPyGPU_DeviceType
);
105
106
return
submodule;
107
}
108
110
111
}
// namespace blender
gpu_py_matrix.hh
gpu_py_offscreen.hh
gpu_py_types.hh
PyModuleDef_HEAD_INIT
blender
BMesh Iterators.
Definition
ANIM_action.hh:30
blender::BPyGPU_BufferType
PyTypeObject BPyGPU_BufferType
Definition
gpu_py_buffer.cc:740
blender::BPyGPUVertFormat_Type
PyTypeObject BPyGPUVertFormat_Type
Definition
gpu_py_vertex_format.cc:190
blender::PyGPUMatrixStackContext_Type
PyTypeObject PyGPUMatrixStackContext_Type
Definition
gpu_py_matrix.cc:202
blender::BPyGPUBatch_Type
PyTypeObject BPyGPUBatch_Type
Definition
gpu_py_batch.cc:637
blender::BPyGPUVertBuf_Type
PyTypeObject BPyGPUVertBuf_Type
Definition
gpu_py_vertex_buffer.cc:364
blender::BPyGPUStageInterfaceInfo_Type
PyTypeObject BPyGPUStageInterfaceInfo_Type
Definition
gpu_py_shader_create_info.cc:478
blender::BPyGPUIndexBuf_Type
PyTypeObject BPyGPUIndexBuf_Type
Definition
gpu_py_element.cc:196
blender::PyGPUOffscreenStackContext_Type
PyTypeObject PyGPUOffscreenStackContext_Type
Definition
gpu_py_offscreen.cc:174
blender::BPyGPUStorageBuf_Type
PyTypeObject BPyGPUStorageBuf_Type
Definition
gpu_py_storagebuffer.cc:273
blender::BPyGPU_DeviceType
PyTypeObject BPyGPU_DeviceType
Definition
gpu_py_platform.cc:119
blender::pygpu_types_module_def
static PyModuleDef pygpu_types_module_def
Definition
gpu_py_types.cc:24
blender::BPyGPUUniformBuf_Type
PyTypeObject BPyGPUUniformBuf_Type
Definition
gpu_py_uniformbuffer.cc:185
blender::BPyGPUTexture_Type
PyTypeObject BPyGPUTexture_Type
Definition
gpu_py_texture.cc:905
blender::BPyGPUFrameBuffer_Type
PyTypeObject BPyGPUFrameBuffer_Type
Definition
gpu_py_framebuffer.cc:873
blender::BPyGPUShader_Type
PyTypeObject BPyGPUShader_Type
Definition
gpu_py_shader.cc:959
blender::bpygpu_types_init
PyObject * bpygpu_types_init()
Definition
gpu_py_types.cc:36
blender::BPyGPUShaderCreateInfo_Type
PyTypeObject BPyGPUShaderCreateInfo_Type
Definition
gpu_py_shader_create_info.cc:1518
blender::BPyGPUOffScreen_Type
PyTypeObject BPyGPUOffScreen_Type
Definition
gpu_py_offscreen.cc:621
Generated on
for Blender by
doxygen
1.18.0