(ByteBuffer from)
| 607 | if (specification.highQuality) { |
| 608 | glGenerateMipmap(specification.target); |
| 609 | } |
| 610 | glBindTexture(specification.target, 0); |
| 611 | |
| 612 | // glFinish(); |
| 613 | |
| 614 | uploadCount++; |
| 615 | return mod; |
| 616 | } |
| 617 | |
| 618 | |
| 619 | public Texture setIsDoubleBuffered(boolean isDoubleBuffered) { |
| 620 | this.isDoubleBuffered = isDoubleBuffered; |
| 621 | return this; |
| 622 | } |
| 623 | |
| 624 | public int getPBOSource(GraphicsContext context) { |
| 625 | State s = GraphicsContext.get(this); |
| 626 | if (isDoubleBuffered) |
| 627 | throw new IllegalArgumentException("can't reliably get the pbo source of a double buffered texture"); |
| 628 | //mod++; |
| 629 | |
| 630 | s.mod++; |
| 631 | |
| 632 | s.x0 = 0; |
| 633 | s.x1 = specification.width; |
| 634 | s.y0 = 0; |
| 635 | s.y1 = specification.height; |
| 636 | |
| 637 | return s.pboA; |
| 638 | } |
| 639 | |
| 640 | @Override |
| 641 | public int[] getPasses() { |
no test coverage detected