Blender
V2.93
source
blender
gpu
tests
gpu_testing.cc
Go to the documentation of this file.
1
/* Apache License, Version 2.0 */
2
3
#include "testing/testing.h"
4
5
#include "
GPU_context.h
"
6
#include "
GPU_init_exit.h
"
7
#include "
gpu_testing.hh
"
8
9
#include "
GHOST_C-api.h
"
10
11
namespace
blender::gpu
{
12
13
void
GPUTest::SetUp
()
14
{
15
GHOST_GLSettings
glSettings = {0};
16
ghost_system =
GHOST_CreateSystem
();
17
ghost_context =
GHOST_CreateOpenGLContext
(ghost_system, glSettings);
18
context =
GPU_context_create
(
nullptr
);
19
GPU_init
();
20
}
21
22
void
GPUTest::TearDown
()
23
{
24
GPU_exit
();
25
GPU_backend_exit
();
26
GPU_context_discard
(context);
27
GHOST_DisposeOpenGLContext
(ghost_system, ghost_context);
28
GHOST_DisposeSystem
(ghost_system);
29
}
30
31
}
// namespace blender::gpu
GHOST_C-api.h
GHOST C-API function and type declarations.
GHOST_CreateSystem
GHOST_SystemHandle GHOST_CreateSystem(void)
Definition:
GHOST_C-api.cpp:40
GHOST_DisposeOpenGLContext
GHOST_TSuccess GHOST_DisposeOpenGLContext(GHOST_SystemHandle systemhandle, GHOST_ContextHandle contexthandle)
Definition:
GHOST_C-api.cpp:146
GHOST_CreateOpenGLContext
GHOST_ContextHandle GHOST_CreateOpenGLContext(GHOST_SystemHandle systemhandle, GHOST_GLSettings glSettings)
Definition:
GHOST_C-api.cpp:138
GHOST_DisposeSystem
GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle)
Definition:
GHOST_C-api.cpp:55
GPU_context.h
GPU_context_discard
void GPU_context_discard(GPUContext *)
Definition:
gpu_context.cc:113
GPU_context_create
GPUContext * GPU_context_create(void *ghost_window)
Definition:
gpu_context.cc:99
GPU_backend_exit
void GPU_backend_exit(void)
Definition:
gpu_context.cc:183
GPU_init_exit.h
GPU_init
void GPU_init(void)
Definition:
gpu_init_exit.c:43
GPU_exit
void GPU_exit(void)
Definition:
gpu_init_exit.c:62
blender::gpu::GPUTest::TearDown
void TearDown() override
Definition:
gpu_testing.cc:22
blender::gpu::GPUTest::SetUp
void SetUp() override
Definition:
gpu_testing.cc:13
gpu_testing.hh
blender::gpu
Definition:
gpu_backend.hh:29
GHOST_GLSettings
Definition:
GHOST_Types.h:66
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1