Opened 2 years ago
GLTeapot hit-testing fails with Mesa17 (x86-64)
|Reported by:||jua||Owned by:||kallisti5|
|Has a Patch:||no||Platform:||All|
Symptom is that you can't click the teapot to move it around when using Haiku x86-64. Might be a problem with our Mesa port, or with the OpenGL code of GLTeapot, I can't tell due to lack of OpenGL knowledge.
Quoting myself from the forum:
[...] moving [the teapot] around with the mouse is currently broken with the Mesa on Haiku x86_64 (works fine on x86_gcc2 and x86_gcc5, which both have older Mesa versions). However, this is unrelated to event handling... the mouse events arrive in its ObjectView::MouseMoved() just fine, it's the hit-testing done then which is broken. GLTeapot does it by drawing the various teapots (you can have more than one) in a number of colours using flat shading and no lighting, then it reads the pixel at the mouse cursor using glReadPixels() and finds out which teapot (if any) was clicked, based on the pixel's colour value. However, in x86_64 Haiku, the glReadPixels() always returns colour (0, 0, 0) for some reason.