Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-07 18:00:28 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-08 02:16:40 +0300
commit1dd737759639c63d3279be774202585de778dac5 (patch)
treeb0b666aa69477ee7eb0cc2b5a379522bd75d1a62 /source/blender/gpu/GPU_context.h
parent0ccf3f89d2e2389d433d1ab682ad04310a9b19ae (diff)
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.
Diffstat (limited to 'source/blender/gpu/GPU_context.h')
-rw-r--r--source/blender/gpu/GPU_context.h8
1 files changed, 8 insertions, 0 deletions
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 *);