diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-07-17 20:03:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-07-18 04:43:52 +0300 |
commit | a6bd7777c20aa229ae9c4cdd537e94cf8a9c7edf (patch) | |
tree | 839f559613038d8ec17e18b7bc85b1a231bf01a4 /source/blender/gpu/intern/gpu_select_pick.c | |
parent | 35f1b3e43b37006486b94675466cf4260087e269 (diff) |
Cleanup: GPU: Encapsulate glViewport calls
Diffstat (limited to 'source/blender/gpu/intern/gpu_select_pick.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_select_pick.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c index 3e5fc1ab19e..c6d8545527c 100644 --- a/source/blender/gpu/intern/gpu_select_pick.c +++ b/source/blender/gpu/intern/gpu_select_pick.c @@ -320,7 +320,7 @@ void gpu_select_pick_begin(uint (*buffer)[4], uint bufsize, const rcti *input, c glDepthFunc(GL_LEQUAL); float viewport[4]; - glGetFloatv(GL_VIEWPORT, viewport); + GPU_viewport_size_get_f(viewport); ps->src.clip_rect = *input; ps->src.rect_len = rect_len; @@ -330,7 +330,7 @@ void gpu_select_pick_begin(uint (*buffer)[4], uint bufsize, const rcti *input, c ps->gl.clip_readpixels[2] = BLI_rcti_size_x(&ps->src.clip_rect); ps->gl.clip_readpixels[3] = BLI_rcti_size_y(&ps->src.clip_rect); - glViewport(UNPACK4(ps->gl.clip_readpixels)); + GPU_viewport(UNPACK4(ps->gl.clip_readpixels)); /* It's possible we don't want to clear depth buffer, * so existing elements are masked by current z-buffer. */ |