Ejemplo n.º 1
0
CzTexture CzPlatformImaging::CreateTexture(CzTexture source, CzImage::eFormat format)
{
	CIwImage::Format f = toMarmImageFormat(format);
	if (f == CIwImage::FORMAT_UNDEFINED)
		return NULL;
	CIwTexture* t = static_cast<CIwTexture*>(source);

	CIwImage* image = new CIwImage();
	image->SetFormat(f);
	image->SetWidth(t->GetWidth());
	image->SetHeight(t->GetHeight());
	t->GetImage().ConvertToImage(image);

	CIwTexture* texture = new CIwTexture();
	texture->_SetFlags( CIwTexture::NO_CHROMA_KEY_F );
	texture->SetMipMapping(t->GetMipMapping());
	texture->SetFiltering(t->GetFiltering());
	texture->SetModifiable(t->GetModifiable());
	texture->CopyFromImage(image);

	delete image;

	return (CzTexture)texture;
}
Ejemplo n.º 2
0
void CzPlatformImaging::setTextureFiltering(CzTexture texture, bool enable)
{
	CIwTexture* t = static_cast<CIwTexture*>(texture);
	t->SetFiltering(enable);
}