From 1dd737759639c63d3279be774202585de778dac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Fri, 7 Aug 2020 17:00:28 +0200 Subject: GPUBackend: Add new GPUBackend object to manage GL object allocations This just set a global object responsible for allocating new objects in a thread safe way without needing any GPUContext bound to this thread. This also introduce the GLContext which will contain all the GL related functions for the current context. --- source/blender/gpu/GPU_context.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/gpu/GPU_context.h') diff --git a/source/blender/gpu/GPU_context.h b/source/blender/gpu/GPU_context.h index 0d9e1014803..e3d47cfe084 100644 --- a/source/blender/gpu/GPU_context.h +++ b/source/blender/gpu/GPU_context.h @@ -35,6 +35,14 @@ extern "C" { typedef struct GPUContext GPUContext; +typedef enum eGPUBackendType { + GPU_BACKEND_NONE = 0, + GPU_BACKEND_OPENGL, +} eGPUBackendType; + +void GPU_backend_init(eGPUBackendType backend); +void GPU_backend_exit(void); + GPUContext *GPU_context_create(void *ghost_window); void GPU_context_discard(GPUContext *); -- cgit v1.2.3