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_sample_query.c | |
parent | 35f1b3e43b37006486b94675466cf4260087e269 (diff) |
Cleanup: GPU: Encapsulate glViewport calls
Diffstat (limited to 'source/blender/gpu/intern/gpu_select_sample_query.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_select_sample_query.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_select_sample_query.c b/source/blender/gpu/intern/gpu_select_sample_query.c index b20b6cac36b..70ad2f6759e 100644 --- a/source/blender/gpu/intern/gpu_select_sample_query.c +++ b/source/blender/gpu/intern/gpu_select_sample_query.c @@ -94,8 +94,8 @@ void gpu_select_query_begin( * We need to get the region of the viewport so that our geometry doesn't * get rejected before the depth test. Should probably cull rect against * the viewport but this is a rare case I think */ - glGetFloatv(GL_VIEWPORT, viewport); - glViewport(viewport[0], viewport[1], BLI_rcti_size_x(input), BLI_rcti_size_y(input)); + GPU_viewport_size_get_f(viewport); + GPU_viewport(viewport[0], viewport[1], BLI_rcti_size_x(input), BLI_rcti_size_y(input)); /* occlusion queries operates on fragments that pass tests and since we are interested on all * objects in the view frustum independently of their order, we need to disable the depth test */ |