Blender V4.3
draw_testing.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#include "draw_testing.hh"
6
7#include "GPU_shader.hh"
8
10
11namespace blender::draw {
12
13/* Base class for draw test cases. It will setup and tear down the GPU part around each test. */
14#ifdef WITH_OPENGL_BACKEND
15void DrawOpenGLTest::SetUp()
16{
17 GPUOpenGLTest::SetUp();
18 DRW_draw_state_init_gtests(GPU_SHADER_CFG_DEFAULT);
19}
20#endif
21
22#ifdef WITH_METAL_BACKEND
23void DrawMetalTest::SetUp()
24{
25 GPUMetalTest::SetUp();
26 DRW_draw_state_init_gtests(GPU_SHADER_CFG_DEFAULT);
27}
28#endif
29
30#ifdef WITH_VULKAN_BACKEND
31void DrawVulkanTest::SetUp()
32{
33 GPUVulkanTest::SetUp();
34 DRW_draw_state_init_gtests(GPU_SHADER_CFG_DEFAULT);
35}
36#endif
37
38} // namespace blender::draw
@ GPU_SHADER_CFG_DEFAULT