Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/tests/gpu_testing.cc
| /* SPDX-License-Identifier: Apache-2.0 */ | /* SPDX-License-Identifier: Apache-2.0 */ | ||||
| #include "testing/testing.h" | #include "testing/testing.h" | ||||
| #include "CLG_log.h" | #include "CLG_log.h" | ||||
| #include "GPU_context.h" | #include "GPU_context.h" | ||||
| #include "GPU_init_exit.h" | #include "GPU_init_exit.h" | ||||
| #include "gpu_testing.hh" | #include "gpu_testing.hh" | ||||
| #include "GHOST_C-api.h" | #include "GHOST_C-api.h" | ||||
| namespace blender::gpu { | namespace blender::gpu { | ||||
| void GPUTest::SetUp() | void GPUTest::SetUp() | ||||
| { | { | ||||
| GPU_backend_type_selection_set(gpu_backend_type); | |||||
| GHOST_GLSettings glSettings = {0}; | GHOST_GLSettings glSettings = {0}; | ||||
| glSettings.context_type = draw_context_type; | |||||
| CLG_init(); | CLG_init(); | ||||
| ghost_system = GHOST_CreateSystem(); | ghost_system = GHOST_CreateSystem(); | ||||
| ghost_context = GHOST_CreateOpenGLContext(ghost_system, glSettings); | ghost_context = GHOST_CreateOpenGLContext(ghost_system, glSettings); | ||||
| GHOST_ActivateOpenGLContext(ghost_context); | GHOST_ActivateOpenGLContext(ghost_context); | ||||
| context = GPU_context_create(nullptr, ghost_context); | context = GPU_context_create(nullptr, ghost_context); | ||||
| GPU_init(); | GPU_init(); | ||||
| } | } | ||||
| Show All 10 Lines | |||||