| 344 | } |
| 345 | |
| 346 | void Widget::resizePixelBuffers() |
| 347 | { |
| 348 | if (mFramePBO!=0) |
| 349 | glDeleteBuffers(1, &mFramePBO); |
| 350 | |
| 351 | uint w = mWidth; |
| 352 | uint h = mHeight; |
| 353 | |
| 354 | glGenBuffers(1, &mFramePBO); |
| 355 | glBindBuffer(GL_PIXEL_PACK_BUFFER, mFramePBO); |
| 356 | glBufferData(GL_PIXEL_PACK_BUFFER, w*h*4*sizeof(uchar), 0, GL_DYNAMIC_READ); |
| 357 | glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); |
| 358 | } |
| 359 | |
| 360 | const glm::mat4 Widget::getViewMatrix(const CellIndex& pIndex) |
| 361 | { |