MCPcopy Create free account
hub / github.com/Kitware/VTK / GetInternalFormat

Method GetInternalFormat

Rendering/OpenGL2/vtkTextureObject.cxx:620–647  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

618
619//------------------------------------------------------------------------------
620unsigned 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//------------------------------------------------------------------------------
650unsigned int vtkTextureObject::GetDefaultInternalFormat(

Callers 15

Create1DMethod · 0.95
Create1DFromRawMethod · 0.95
CreateTextureBufferMethod · 0.95
Create2DMethod · 0.95
Create3DMethod · 0.95
Create3DFromRawMethod · 0.95
Create2DFromRawMethod · 0.95
Create2DArrayFromRawMethod · 0.95
CreateCubeFromRawMethod · 0.95
Allocate1DMethod · 0.95
Allocate2DMethod · 0.95

Calls 1

Tested by

no test coverage detected