MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/MaterialX / getBaseStride

Method getBaseStride

source/MaterialXRender/Image.cpp:108–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108unsigned int Image::getBaseStride() const
109{
110 if (_baseType == BaseType::FLOAT)
111 {
112 return 4;
113 }
114 if (_baseType == BaseType::HALF ||
115 _baseType == BaseType::UINT16 ||
116 _baseType == BaseType::INT16)
117 {
118 return 2;
119 }
120 if (_baseType == BaseType::UINT8 ||
121 _baseType == BaseType::INT8)
122 {
123 return 1;
124 }
125 throw Exception("Unsupported base type in getBaseStride");
126}
127
128unsigned int Image::getMaxMipCount() const
129{

Callers 3

saveImageMethod · 0.80
saveImageMethod · 0.80
makeTextureMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected