339 { |
339 { |
340 const gl::RenderStyle oldRenderStyle = this->renderPreferences.style; |
340 const gl::RenderStyle oldRenderStyle = this->renderPreferences.style; |
341 this->renderPreferences.style = gl::RenderStyle::PickScene; |
341 this->renderPreferences.style = gl::RenderStyle::PickScene; |
342 this->makeCurrent(); |
342 this->makeCurrent(); |
343 this->renderScene(); |
343 this->renderScene(); |
344 std::array<GLbyte, 3> data; |
344 std::array<GLubyte, 3> data; |
345 this->checkForGLErrors(); |
345 this->checkForGLErrors(); |
346 glReadPixels(where.x(), this->height() - where.y(), 1, 1, GL_RGB, GL_UNSIGNED_BYTE, &data[0]); |
346 glReadPixels(where.x(), this->height() - where.y(), 1, 1, GL_RGB, GL_UNSIGNED_BYTE, &data[0]); |
347 this->checkForGLErrors(); |
347 this->checkForGLErrors(); |
348 this->renderPreferences.style = oldRenderStyle; |
348 this->renderPreferences.style = oldRenderStyle; |
349 this->update(); |
349 this->update(); |