- moved the material class to 'common' as well.

This commit is contained in:
Christoph Oelckers 2020-04-11 19:07:08 +02:00
commit 65f15e1147
7 changed files with 53 additions and 59 deletions

View file

@ -51,6 +51,7 @@
// Wrappers to keep the definitions of these classes out of here.
void DeleteMaterial(FMaterial* mat);
void DeleteSoftwareTexture(FSoftwareTexture *swtex);
IHardwareTexture* CreateHardwareTexture();
FTexture *CreateBrightmapTexture(FImageSource*);
@ -846,3 +847,21 @@ void FTexCoordInfo::GetFromTexture(FTexture *tex, float x, float y, bool forcewo
}
//==========================================================================
//
// this must be copied back to textures.cpp later.
//
//==========================================================================
FWrapperTexture::FWrapperTexture(int w, int h, int bits)
{
Width = w;
Height = h;
Format = bits;
UseType = ETextureType::SWCanvas;
bNoCompress = true;
auto hwtex = CreateHardwareTexture();
// todo: Initialize here.
SystemTextures.AddHardwareTexture(0, false, hwtex);
}