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_texture.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_texture.hh')
-rw-r--r-- | source/blender/gpu/opengl/gl_texture.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_texture.hh b/source/blender/gpu/opengl/gl_texture.hh index 0e054d7996a..36da89dad8e 100644 --- a/source/blender/gpu/opengl/gl_texture.hh +++ b/source/blender/gpu/opengl/gl_texture.hh @@ -58,6 +58,9 @@ class GLTexture : public Texture { friend class GLStateManager; private: + /** All samplers states. */ + static GLuint samplers_[GPU_SAMPLER_MAX]; + /** Target to bind the texture to (GL_TEXTURE_1D, GL_TEXTURE_2D, etc...)*/ GLenum target_ = -1; /** opengl identifier for texture. */ @@ -85,6 +88,10 @@ class GLTexture : public Texture { /* TODO(fclem) Legacy. Should be removed at some point. */ uint gl_bindcode_get(void) const override; + static void samplers_init(void); + static void samplers_free(void); + static void samplers_update(void); + protected: bool init_internal(void) override; bool init_internal(GPUVertBuf *vbo) override; |