It says Assertion failed: x + window.getSize().x <= m_size.x
Size and x\y are correct
It all breaks on last line. I need it for selection and copy/paste tool
bufferRect.width = abs(curPos.x - point1.x);
bufferRect.height = abs(curPos.y - point1.y);
int width = bufferRect.width;
int height = bufferRect.height;
int x = bufferRect.left;
int y = bufferRect.top;
std::cout << "width is "<< bufferRect.width << std::endl;
std::cout << "height is " << bufferRect.height << std::endl;
std::cout << "left and top are " << bufferRect.left << " + " << bufferRect.top << std::endl;
bufferTexture.create(width, height);
bufferTexture.update(mainWindow,x ,y );