MCPcopy Create free account
hub / github.com/axmolengine/axmol / updateWithData

Method updateWithData

core/renderer/Texture2D.cpp:281–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281bool Texture2D::updateWithData(const void* data,
282 ssize_t dataLen,
283 backend::PixelFormat pixelFormat,
284 backend::PixelFormat renderFormat,
285 int pixelsWide,
286 int pixelsHigh,
287 bool preMultipliedAlpha,
288 int index)
289{
290 AXASSERT(dataLen > 0 && pixelsWide > 0 && pixelsHigh > 0, "Invalid size");
291
292 // if data has no mipmaps, we will consider it has only one mipmap
293 MipmapInfo mipmap;
294 mipmap.address = (unsigned char*)data;
295 mipmap.len = static_cast<int>(dataLen);
296 return updateWithMipmaps(&mipmap, 1, pixelFormat, renderFormat, pixelsWide, pixelsHigh, preMultipliedAlpha, index);
297}
298
299bool Texture2D::updateWithMipmaps(MipmapInfo* mipmaps,
300 int mipmapsNum,

Callers 1

MediaPlayerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected