diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-08 01:30:38 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-08 05:15:50 +0300 |
commit | 28ea459a61f65de03724db8709271d41f6bf135b (patch) | |
tree | b01a390416b317976227b5b72f25e416b90d445b /source/blender/gpu/opengl | |
parent | 77f60a09310dad0cb41e2e2ec4a71f9bdb762e67 (diff) |
GPUState: Encapsulate glPixelStorei inside the GLStateManager
Part of the Vulkan task T68990
Isolate the last remaining gl functions.
Diffstat (limited to 'source/blender/gpu/opengl')
-rw-r--r-- | source/blender/gpu/opengl/gl_state.cc | 5 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_state.hh | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_state.cc b/source/blender/gpu/opengl/gl_state.cc index b43b01aed4f..6dcb56288e8 100644 --- a/source/blender/gpu/opengl/gl_state.cc +++ b/source/blender/gpu/opengl/gl_state.cc @@ -520,6 +520,11 @@ void GLStateManager::texture_bind_apply(void) } } +void GLStateManager::texture_unpack_row_length_set(uint len) +{ + glPixelStorei(GL_UNPACK_ROW_LENGTH, len); +} + uint64_t GLStateManager::bound_texture_slots(void) { uint64_t bound_slots = 0; diff --git a/source/blender/gpu/opengl/gl_state.hh b/source/blender/gpu/opengl/gl_state.hh index d5622b4ab89..db9b9721ad5 100644 --- a/source/blender/gpu/opengl/gl_state.hh +++ b/source/blender/gpu/opengl/gl_state.hh @@ -74,6 +74,8 @@ class GLStateManager : public GPUStateManager { void texture_unbind(Texture *tex) override; void texture_unbind_all(void) override; + void texture_unpack_row_length_set(uint len) override; + uint64_t bound_texture_slots(void); private: |