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

Method SafeLoadTexture

Rendering/VolumeOpenGL2/vtkVolumeTexture.cxx:949–973  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

947
948//------------------------------------------------------------------------------
949bool vtkVolumeTexture::SafeLoadTexture(vtkTextureObject* texture, int width, int height, int depth,
950 int numComps, int dataType, void* dataPtr)
951{
952 if (!AreDimensionsValid(texture, width, height, depth))
953 {
954 vtkErrorMacro(<< "Invalid texture dimensions [" << width << ", " << height << ", " << depth
955 << "]");
956 return false;
957 }
958
959 if (!texture->AllocateProxyTexture3D(width, height, depth, numComps, dataType))
960 {
961 vtkErrorMacro(<< "Capabilities check via proxy texture 3D allocation "
962 "failed!");
963 return false;
964 }
965
966 if (!texture->Create3DFromRaw(width, height, depth, numComps, dataType, dataPtr))
967 {
968 vtkErrorMacro(<< "Texture 3D allocation failed! \n");
969 return false;
970 }
971
972 return true;
973}
974
975//------------------------------------------------------------------------------
976void vtkVolumeTexture::ComputeBounds(VolumeBlock* block)

Callers

nothing calls this directly

Calls 2

Create3DFromRawMethod · 0.80

Tested by

no test coverage detected