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

Method GetDefaultDataType

Rendering/OpenGL2/vtkTextureObject.cxx:858–886  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

856
857//------------------------------------------------------------------------------
858int vtkTextureObject::GetDefaultDataType(int vtk_scalar_type)
859{
860 // DON'T DEAL with VTK_CHAR as this is platform dependent.
861 switch (vtk_scalar_type)
862 {
863 case VTK_SIGNED_CHAR:
864 return GL_BYTE;
865
866 case VTK_UNSIGNED_CHAR:
867 return GL_UNSIGNED_BYTE;
868
869 case VTK_SHORT:
870 return GL_SHORT;
871
872 case VTK_UNSIGNED_SHORT:
873 return GL_UNSIGNED_SHORT;
874
875 case VTK_INT:
876 return GL_INT;
877
878 case VTK_UNSIGNED_INT:
879 return GL_UNSIGNED_INT;
880
881 case VTK_FLOAT:
882 case VTK_VOID: // used for depth component textures.
883 return GL_FLOAT;
884 }
885 return 0;
886}
887
888//------------------------------------------------------------------------------
889int vtkTextureObject::GetVTKDataType()

Callers 6

GetDataTypeMethod · 0.95
Create1DMethod · 0.95
Create2DMethod · 0.95
CreateDepthMethod · 0.95
Create3DMethod · 0.95
LoadVolumeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected