Blender
V2.93
source
blender
gpu
intern
gpu_init_exit.c
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*
16
* The Original Code is Copyright (C) 2013 Blender Foundation.
17
* All rights reserved.
18
*/
19
24
#include "
GPU_init_exit.h
"
/* interface */
25
#include "
BKE_global.h
"
26
#include "
BLI_sys_types.h
"
27
#include "
GPU_batch.h
"
28
#include "
GPU_buffers.h
"
29
#include "
GPU_context.h
"
30
#include "
GPU_immediate.h
"
31
32
#include "
intern/gpu_codegen.h
"
33
#include "
intern/gpu_material_library.h
"
34
#include "
intern/gpu_private.h
"
35
41
static
bool
initialized
=
false
;
42
43
void
GPU_init
(
void
)
44
{
45
/* can't avoid calling this multiple times, see wm_window_ghostwindow_add */
46
if
(
initialized
) {
47
return
;
48
}
49
50
initialized
=
true
;
51
52
gpu_codegen_init
();
53
gpu_material_library_init
();
54
55
gpu_batch_init
();
56
57
#ifndef GPU_STANDALONE
58
gpu_pbvh_init
();
59
#endif
60
}
61
62
void
GPU_exit
(
void
)
63
{
64
#ifndef GPU_STANDALONE
65
gpu_pbvh_exit
();
66
#endif
67
68
gpu_batch_exit
();
69
70
gpu_material_library_exit
();
71
gpu_codegen_exit
();
72
73
initialized
=
false
;
74
}
75
76
bool
GPU_is_init
(
void
)
77
{
78
return
initialized
;
79
}
BKE_global.h
BLI_sys_types.h
GPU_batch.h
gpu_batch_init
void gpu_batch_init(void)
Definition:
gpu_batch.cc:318
gpu_batch_exit
void gpu_batch_exit(void)
Definition:
gpu_batch.cc:323
GPU_buffers.h
GPU_context.h
GPU_immediate.h
GPU_init_exit.h
gpu_pbvh_exit
void gpu_pbvh_exit()
Definition:
gpu_buffers.c:130
gpu_pbvh_init
void gpu_pbvh_init()
Definition:
gpu_buffers.c:112
gpu_codegen_init
void gpu_codegen_init(void)
Definition:
gpu_codegen.c:1116
gpu_codegen_exit
void gpu_codegen_exit(void)
Definition:
gpu_codegen.c:1120
gpu_codegen.h
GPU_is_init
bool GPU_is_init(void)
Definition:
gpu_init_exit.c:76
GPU_init
void GPU_init(void)
Definition:
gpu_init_exit.c:43
initialized
static bool initialized
Definition:
gpu_init_exit.c:41
GPU_exit
void GPU_exit(void)
Definition:
gpu_init_exit.c:62
gpu_material_library_exit
void gpu_material_library_exit(void)
Definition:
gpu_material_library.c:846
gpu_material_library_init
void gpu_material_library_init(void)
Definition:
gpu_material_library.c:833
gpu_material_library.h
gpu_private.h
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1