------------------------------------------------------------------------------
| 618 | |
| 619 | //------------------------------------------------------------------------------ |
| 620 | unsigned int vtkTextureObject::GetInternalFormat( |
| 621 | int vtktype, int numComps, bool shaderSupportsTextureInt) |
| 622 | { |
| 623 | if (this->InternalFormat) |
| 624 | { |
| 625 | return this->InternalFormat; |
| 626 | } |
| 627 | |
| 628 | // pre-condition |
| 629 | if (vtktype == VTK_VOID && numComps != 1) |
| 630 | { |
| 631 | vtkErrorMacro( |
| 632 | "Depth component texture must have 1 component only (" << numComps << " requested"); |
| 633 | this->InternalFormat = 0; |
| 634 | return this->InternalFormat; |
| 635 | } |
| 636 | |
| 637 | this->InternalFormat = |
| 638 | this->GetDefaultInternalFormat(vtktype, numComps, shaderSupportsTextureInt); |
| 639 | |
| 640 | if (!this->InternalFormat) |
| 641 | { |
| 642 | vtkDebugMacro("Unable to find suitable internal format for T=" |
| 643 | << vtktype << " NC=" << numComps << " SSTI=" << shaderSupportsTextureInt); |
| 644 | } |
| 645 | |
| 646 | return this->InternalFormat; |
| 647 | } |
| 648 | |
| 649 | //------------------------------------------------------------------------------ |
| 650 | unsigned int vtkTextureObject::GetDefaultInternalFormat( |
no test coverage detected