diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-05 18:31:53 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-05 18:49:14 +0300 |
commit | 31c77a14af7cac2bc52ecaffde1bae9775dc47ae (patch) | |
tree | 08f6704e927bd7cb1d7ca2b6f30ee3b941d2ffff /source/blender/gpu/opengl/gl_backend.hh | |
parent | c766d9b9dc5661693a58e01a3637f15197c2fe59 (diff) |
GPUTexture: Add support for samplers
This just add back the support.
This commit also includes a bit of cleanup.
# Conflicts:
# source/blender/gpu/GPU_texture.h
Diffstat (limited to 'source/blender/gpu/opengl/gl_backend.hh')
-rw-r--r-- | source/blender/gpu/opengl/gl_backend.hh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_backend.hh b/source/blender/gpu/opengl/gl_backend.hh index 6029ff9e309..f769d9c1cfe 100644 --- a/source/blender/gpu/opengl/gl_backend.hh +++ b/source/blender/gpu/opengl/gl_backend.hh @@ -43,11 +43,25 @@ class GLBackend : public GPUBackend { GLSharedOrphanLists shared_orphan_list_; public: + GLBackend() + { + GLTexture::samplers_init(); + } + ~GLBackend() + { + GLTexture::samplers_free(); + } + static GLBackend *get(void) { return static_cast<GLBackend *>(GPUBackend::get()); } + void samplers_update(void) override + { + GLTexture::samplers_update(); + }; + GPUContext *context_alloc(void *ghost_window) { return new GLContext(ghost_window, shared_orphan_list_); |