src/gl/partrenderer.cpp

changeset 78
97c3ce5aa498
parent 77
028798a72591
child 86
4bec0525ef1b
equal deleted inserted replaced
77:028798a72591 78:97c3ce5aa498
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();

mercurial