@yinjimmy 写道:
auto pixelPos = CC_POINT_POINTS_TO_PIXELS(center); cmd = new CustomCommand(); cmd->func = [=]() { glPixelStorei(GL_PACK_ALIGNMENT, 1); glReadPixels(pixelPos.x, pixelPos.y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel); }; rt->beginWithClear(0, 0, 0, 0); spr1->visit(); _director->getRenderer()->addCommand(cmd); rt->end();
帖子: 1
参与者: 1