diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-07 16:39:47 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-07 20:37:04 +0300 |
commit | 360489c75167d47653bc34ad9ba9a65076bf384c (patch) | |
tree | f4d28e3add0893ae47146314d893e925dc30120e /source/blender/gpu/opengl/gl_backend.hh | |
parent | 9cac181fbead28c0bf963bf2b9f82fddf3c2b7df (diff) |
GPUPlatform: GL backend isolation
Part of the vulkan implementation T68990.
Pretty straight forward. Just move the GL code inside the GLBackend and
make the GPUPlatformGlobal a class object.
Diffstat (limited to 'source/blender/gpu/opengl/gl_backend.hh')
-rw-r--r-- | source/blender/gpu/opengl/gl_backend.hh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_backend.hh b/source/blender/gpu/opengl/gl_backend.hh index c178aa537a0..9548aa9dd92 100644 --- a/source/blender/gpu/opengl/gl_backend.hh +++ b/source/blender/gpu/opengl/gl_backend.hh @@ -47,11 +47,16 @@ class GLBackend : public GPUBackend { public: GLBackend() { + /* platform_init needs to go first. */ + GLBackend::platform_init(); + GLTexture::samplers_init(); } ~GLBackend() { GLTexture::samplers_free(); + + GLBackend::platform_exit(); } static GLBackend *get(void) @@ -118,6 +123,10 @@ class GLBackend : public GPUBackend { orphan_list.append(id); list_mutex.unlock(); } + + private: + static void platform_init(void); + static void platform_exit(void); }; } // namespace gpu |