CzTexture CzPlatformImaging::CreateTexture(void* pixels, int width, int height, int pitch, CzImage::eFormat format, bool modifiable) { if (pixels == NULL || width <= 0 || height <= 0) return false; CIwImage::Format f = toMarmImageFormat(format); if (f == CIwImage::FORMAT_UNDEFINED) return NULL; CIwTexture* texture = new CIwTexture(); texture->_SetFlags( CIwTexture::NO_CHROMA_KEY_F ); texture->SetMipMapping(false); texture->SetModifiable(modifiable); texture->CopyFromBuffer(width, height, f, pitch, (uint8*)pixels, NULL); return (CzTexture)texture; }