Blender
V3.3
source
blender
gpu
tests
gpu_testing.cc
Go to the documentation of this file.
1
/* SPDX-License-Identifier: Apache-2.0 */
2
3
#include "testing/testing.h"
4
5
#include "
CLG_log.h
"
6
7
#include "
GPU_context.h
"
8
#include "
GPU_init_exit.h
"
9
#include "
gpu_testing.hh
"
10
11
#include "
GHOST_C-api.h
"
12
13
namespace
blender::gpu
{
14
15
void
GPUTest::SetUp
()
16
{
17
GHOST_GLSettings
glSettings = {0};
18
CLG_init
();
19
ghost_system =
GHOST_CreateSystem
();
20
ghost_context =
GHOST_CreateOpenGLContext
(ghost_system, glSettings);
21
GHOST_ActivateOpenGLContext
(ghost_context);
22
context =
GPU_context_create
(
nullptr
);
23
GPU_init
();
24
}
25
26
void
GPUTest::TearDown
()
27
{
28
GPU_exit
();
29
GPU_context_discard
(context);
30
GHOST_DisposeOpenGLContext
(ghost_system, ghost_context);
31
GHOST_DisposeSystem
(ghost_system);
32
CLG_exit
();
33
}
34
35
}
// namespace blender::gpu
CLG_log.h
CLG_exit
void CLG_exit(void)
Definition:
clog.c:703
CLG_init
void CLG_init(void)
Definition:
clog.c:696
GHOST_C-api.h
GHOST C-API function and type declarations.
GHOST_CreateSystem
GHOST_SystemHandle GHOST_CreateSystem(void)
Definition:
GHOST_C-api.cpp:25
GHOST_DisposeOpenGLContext
GHOST_TSuccess GHOST_DisposeOpenGLContext(GHOST_SystemHandle systemhandle, GHOST_ContextHandle contexthandle)
Definition:
GHOST_C-api.cpp:131
GHOST_ActivateOpenGLContext
GHOST_TSuccess GHOST_ActivateOpenGLContext(GHOST_ContextHandle contexthandle)
Definition:
GHOST_C-api.cpp:700
GHOST_CreateOpenGLContext
GHOST_ContextHandle GHOST_CreateOpenGLContext(GHOST_SystemHandle systemhandle, GHOST_GLSettings glSettings)
Definition:
GHOST_C-api.cpp:123
GHOST_DisposeSystem
GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle)
Definition:
GHOST_C-api.cpp:40
GPU_context.h
GPU_context_discard
void GPU_context_discard(GPUContext *)
Definition:
gpu_context.cc:110
GPU_context_create
GPUContext * GPU_context_create(void *ghost_window)
Definition:
gpu_context.cc:93
GPU_init_exit.h
GPU_init
void GPU_init(void)
Definition:
gpu_init_exit.c:24
GPU_exit
void GPU_exit(void)
Definition:
gpu_init_exit.c:45
blender::gpu::GPUTest::TearDown
void TearDown() override
Definition:
gpu_testing.cc:26
blender::gpu::GPUTest::SetUp
void SetUp() override
Definition:
gpu_testing.cc:15
gpu_testing.hh
blender::gpu
Definition:
gpu_backend.hh:15
GHOST_GLSettings
Definition:
GHOST_Types.h:57
Generated on Tue Oct 22 2024 13:18:25 for Blender by
doxygen
1.9.1