Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
		
			
				
	
	
		
			37 lines
		
	
	
		
			752 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			752 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /* SPDX-License-Identifier: Apache-2.0 */
 | |
| 
 | |
| #include "testing/testing.h"
 | |
| 
 | |
| #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};
 | |
|   CLG_init();
 | |
|   ghost_system = GHOST_CreateSystem();
 | |
|   ghost_context = GHOST_CreateOpenGLContext(ghost_system, glSettings);
 | |
|   GHOST_ActivateOpenGLContext(ghost_context);
 | |
|   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);
 | |
|   CLG_exit();
 | |
| }
 | |
| 
 | |
| }  // namespace blender::gpu
 |