MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getTextureSampler

Method getTextureSampler

Engine/source/ts/collada/colladaUtils.cpp:133–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133const domFx_sampler2D_common_complexType* ColladaUtils::getTextureSampler(const domEffect* effect,
134 const domCommon_color_or_texture_type_complexType* texture)
135{
136 // <texture texture="new_param_SID">.<newparam>.<sampler2D>
137 if (texture) {
138 const domCommon_color_or_texture_type_complexType::domTexture* domTex = texture->getTexture();
139 if (domTex && domTex->getTexture()) {
140 daeSIDResolver resolver(const_cast<domEffect*>(effect), domTex->getTexture());
141 const domCommon_newparam_type* param = daeSafeCast<domCommon_newparam_type>(resolver.getElement());
142 if (param)
143 return param->getSampler2D();
144 }
145 }
146
147 return NULL;
148}
149
150String ColladaUtils::getSamplerImagePath(const domEffect* effect,
151 const domFx_sampler2D_common_complexType* sampler2D)

Callers

nothing calls this directly

Calls 3

getTextureMethod · 0.45
getElementMethod · 0.45
getSampler2DMethod · 0.45

Tested by

no test coverage detected