MCPcopy Create free account
hub / github.com/OGRECave/ogre / loadImage

Method loadImage

OgreMain/src/OgreTextureManager.cpp:148–166  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

146 }
147 //-----------------------------------------------------------------------
148 TexturePtr TextureManager::loadImage( const String &name, const String& group,
149 const Image &img, TextureType texType, int numMipmaps, Real gamma, bool isAlpha,
150 PixelFormat desiredFormat, bool hwGamma)
151 {
152 TexturePtr tex = create(name, group, true);
153
154 tex->setTextureType(texType);
155 tex->setNumMipmaps((numMipmaps == MIP_DEFAULT)? mDefaultNumMipmaps :
156 static_cast<uint32>(numMipmaps));
157 tex->setGamma(gamma);
158 OGRE_IGNORE_DEPRECATED_BEGIN
159 tex->setTreatLuminanceAsAlpha(isAlpha);
160 OGRE_IGNORE_DEPRECATED_END
161 tex->setFormat(desiredFormat);
162 tex->setHardwareGammaEnabled(hwGamma);
163 tex->loadImage(img);
164
165 return tex;
166 }
167 //-----------------------------------------------------------------------
168 TexturePtr TextureManager::loadRawData(const String &name, const String& group,
169 DataStreamPtr& stream, ushort uWidth, ushort uHeight,

Callers

nothing calls this directly

Calls 4

setNumMipmapsMethod · 0.80
setGammaMethod · 0.80
createFunction · 0.50

Tested by

no test coverage detected