MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / addSampler

Method addSampler

COLLADAStreamWriter/src/COLLADASWEffectProfile.cpp:246–266  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

244
245 //---------------------------------------------------------------
246 void EffectProfile::addSampler ( const ColorOrTexture& colorOrTexture )
247 {
248 // Don't implement double textures!
249 if ( colorOrTexture.isTexture() )
250 {
251 // TODO: add COLLADASW 1.5 texture
252 const Texture& texture = colorOrTexture.getTexture();
253
254 // Have a look, if we have this surface already written.
255 std::vector<String>::const_iterator iter;
256 iter = find ( mSampledImages.begin(), mSampledImages.end(), texture.getImageId() );
257 if ( iter == mSampledImages.end() )
258 {
259 // Push the id of the image in the list of sampled surface image ids
260 mSampledImages.push_back ( texture.getImageId() );
261
262 texture.getSampler().addInNewParam ( mSW );
263 }
264
265 }
266 }
267
268
269 //---------------------------------------------------------------

Callers

nothing calls this directly

Calls 6

addInNewParamMethod · 0.80
isTextureMethod · 0.45
getTextureMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected