This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/gpu/tests/gpu_testing.cc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
698 B
C++
Raw Normal View History

/* Apache License, Version 2.0 */
#include "testing/testing.h"
2021-05-10 07:59:10 +02:00
#include "CLG_log.h"
#include "GPU_context.h"
#include "GPU_init_exit.h"
#include "gpu_testing.hh"
#include "GHOST_C-api.h"
namespace blender::gpu {
void GPUTest::SetUp()
{
GHOST_GLSettings glSettings = {0};
2021-05-10 07:59:10 +02:00
CLG_init();
ghost_system = GHOST_CreateSystem();
ghost_context = GHOST_CreateOpenGLContext(ghost_system, glSettings);
2021-04-09 13:09:15 +02:00
context = GPU_context_create(nullptr);
GPU_init();
}
void GPUTest::TearDown()
{
GPU_exit();
GPU_backend_exit();
GPU_context_discard(context);
GHOST_DisposeOpenGLContext(ghost_system, ghost_context);
GHOST_DisposeSystem(ghost_system);
2021-05-10 07:59:10 +02:00
CLG_exit();
}
2020-10-02 09:48:41 +10:00
} // namespace blender::gpu