| 573 | } |
| 574 | |
| 575 | void cv::ogl::Buffer::create(int arows, int acols, int atype, Target target, bool autoRelease) |
| 576 | { |
| 577 | #ifndef HAVE_OPENGL |
| 578 | (void) arows; |
| 579 | (void) acols; |
| 580 | (void) atype; |
| 581 | (void) target; |
| 582 | (void) autoRelease; |
| 583 | throw_nogl(); |
| 584 | #else |
| 585 | if (rows_ != arows || cols_ != acols || type_ != atype) |
| 586 | { |
| 587 | const GLsizeiptr asize = arows * acols * CV_ELEM_SIZE(atype); |
| 588 | impl_ = new Impl(asize, 0, target, autoRelease); |
| 589 | rows_ = arows; |
| 590 | cols_ = acols; |
| 591 | type_ = atype; |
| 592 | } |
| 593 | #endif |
| 594 | } |
| 595 | |
| 596 | void cv::ogl::Buffer::release() |
| 597 | { |