Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2019-05-14 14:55:35 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-05-14 15:55:12 +0300
commit0dd5281ab295361bea348874cf841a5937352ba3 (patch)
tree80b1fc331175c8c057acb49a799a146fd04a8946 /source/blender/gpu/intern/gpu_select_sample_query.c
parent687385b963f4389b3d714fed264bb0ff24bc43f5 (diff)
GPU: Windows+Intel Selection Fix
On Windows 10 with a post Februari 2019 Intel driver, the box selection is not working. It only detects the object centers, but not the drawn triangles of the basic engine. Reviewed By: fclem Maniphest Tasks: T62947 Differential Revision: https://developer.blender.org/D4857
Diffstat (limited to 'source/blender/gpu/intern/gpu_select_sample_query.c')
-rw-r--r--source/blender/gpu/intern/gpu_select_sample_query.c7
1 files changed, 5 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 3fbc24d6089..56f9ef69221 100644
--- a/source/blender/gpu/intern/gpu_select_sample_query.c
+++ b/source/blender/gpu/intern/gpu_select_sample_query.c
@@ -104,8 +104,11 @@ void gpu_select_query_begin(
/* 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 */
if (mode == GPU_SELECT_ALL) {
- glDisable(GL_DEPTH_TEST);
- glDepthMask(GL_FALSE);
+ /* glQueries on Windows+Intel drivers only works with depth testing turned on.
+ * See T62947 for details */
+ glEnable(GL_DEPTH_TEST);
+ glDepthFunc(GL_ALWAYS);
+ glDepthMask(GL_TRUE);
}
else if (mode == GPU_SELECT_NEAREST_FIRST_PASS) {
glClear(GL_DEPTH_BUFFER_BIT);