chiark / gitweb /
Fix object selection on windows 8.
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Mon, 26 Oct 2015 18:21:43 +0000 (14:21 -0400)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Mon, 26 Oct 2015 18:24:42 +0000 (14:24 -0400)
commitf1a2e3485d9bb42bfcc70b9cc842772039914b9e
tree5a05bfd02c9ce16e9122843f8d99cbd0d804879d
parente4f092becc3411d03522aac7ceab51fa5961722e
Fix object selection on windows 8.

The issue is that the GL_UNSIGNED_INT_8_8_8_8 format is apparently
not supported on some version of windows and leads to a glReadPixels
that returns 0 everywhere which selects the first object only wherever
you click.
The issue with using GL_UNSIGNED_INT is that the result is also different
from linux and windows, for some reason the value on window is mangled
and not all bytes have the correct value. So we are forced to use
GL_UNSIGNED_BYTE and convert the byte into an int to get the position
of the object selected, since GL_UNSIGNED_BYTE seems to have the same
behavior across platforms.

Fixes T24
Cura/gui/sceneView.py