<div dir="ltr"><div>Hi Antony,<br><br></div><div>Ah, ok, I see.<br><br></div><div>GL select is a very ill-defined part of the GL 1.0 spec, which is why driver developers are reluctant to optimize it. I collaborate on the Mesa project, and some of the other developers thought it would be a good idea for me to try to see if I can help with Blender's GL usage in any way. It would be helpful to us and Blender both if we could get Blender running on OpenGL core 3.0. I'm completely new to the Blender project (I've used Blender a little), so I'm not sure how much work there is to do toward this goal.<br><br></div><div>Have you tried any other strategies besides GL select and occlusion queries? In my master's thesis, I used a common technique to make selections whereby you color-code each selectable object with a different value and read back the color to tell which object was picked. It's kind of like this: <a href="http://content.gpwiki.org/OpenGL_Selection_Using_Unique_Color_IDs">http://content.gpwiki.org/OpenGL_Selection_Using_Unique_Color_IDs</a>, only I used shaders and painted each object or fragment with a different value to get a fine-grained result.<br><br></div><div>Thanks.<br><br></div><div>Laura<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 4, 2015 at 11:40 PM, Antony Riakiotakis <span dir="ltr"><<a href="mailto:kalast@gmail.com" target="_blank">kalast@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Laura, the two modes are not equivalent. GL Select is more precise<br>
than occlusion queries, that's why we tend to prefer one over the<br>
other.<br>
<div><div class="h5"><br>
On 5 September 2015 at 06:45, Laura Ekstrand <<a href="mailto:laura@jlekstrand.net">laura@jlekstrand.net</a>> wrote:<br>
> Refer to bug: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=34495" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=34495</a>, Comment 78<br>
><br>
> The default selection mode (File > User Preferences > System > Selection) of<br>
> Automatic preferred using glRenderMode(GL_SELECT) unless the user's GPU was an<br>
> ATI. Since glRenderMode(GL_SELECT) is deprecated, driver developers rely on<br>
> software fallbacks for its implementation. These software fallbacks are slow.<br>
><br>
> Since all drivers (including all open source drivers) now implement<br>
> GL_ARB_OCCLUSION_QUERY, this patch sets the selection mode to always<br>
> use occlusion query unless:<br>
><br>
> 1. GL_ARB_OCCLUSION_QUERY is not present in the driver, or<br>
> 2. The user has selected the GL_SELECT selection mode manually using File ><br>
> User Preferences > System > Selection.<br>
> ---<br>
> source/blender/gpu/intern/gpu_select.c | 3 +--<br>
> 1 file changed, 1 insertion(+), 2 deletions(-)<br>
><br>
> diff --git a/source/blender/gpu/intern/gpu_select.c b/source/blender/gpu/intern/gpu_select.c<br>
> index 4978229..0d0dd33 100644<br>
> --- a/source/blender/gpu/intern/gpu_select.c<br>
> +++ b/source/blender/gpu/intern/gpu_select.c<br>
> @@ -243,6 +243,5 @@ bool GPU_select_query_check_support(void)<br>
> bool GPU_select_query_check_active(void)<br>
> {<br>
> return GLEW_ARB_occlusion_query &&<br>
> - ((U.gpu_select_method == USER_SELECT_USE_OCCLUSION_QUERY) ||<br>
> - ((U.gpu_select_method == USER_SELECT_AUTO) && GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_ANY)));<br>
> + (U.gpu_select_method != USER_SELECT_USE_SELECT_RENDERMODE);<br>
> }<br>
> --<br>
> 2.4.3<br>
><br>
</div></div>> _______________________________________________<br>
> Bf-codereview mailing list<br>
> <a href="mailto:Bf-codereview@blender.org">Bf-codereview@blender.org</a><br>
> <a href="http://lists.blender.org/mailman/listinfo/bf-codereview" rel="noreferrer" target="_blank">http://lists.blender.org/mailman/listinfo/bf-codereview</a><br>
_______________________________________________<br>
Bf-codereview mailing list<br>
<a href="mailto:Bf-codereview@blender.org">Bf-codereview@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-codereview" rel="noreferrer" target="_blank">http://lists.blender.org/mailman/listinfo/bf-codereview</a><br>
</blockquote></div><br></div>