- let FSkybox inherit from FImageTexture to simplify the redirection of the base image for the software renderer.
This commit is contained in:
parent
9a3b663e04
commit
e92be97f33
5 changed files with 30 additions and 56 deletions
|
|
@ -54,18 +54,23 @@ FImageTexture::FImageTexture(FImageSource *img, const char *name) noexcept
|
|||
if (img != nullptr)
|
||||
{
|
||||
if (name == nullptr) fileSystem.GetFileShortName(Name, img->LumpNum());
|
||||
Width = img->GetWidth();
|
||||
Height = img->GetHeight();
|
||||
|
||||
auto offsets = img->GetOffsets();
|
||||
_LeftOffset[1] = _LeftOffset[0] = offsets.first;
|
||||
_TopOffset[1] = _TopOffset[0] = offsets.second;
|
||||
|
||||
bMasked = img->bMasked;
|
||||
bTranslucent = img->bTranslucent;
|
||||
SetFromImage();
|
||||
}
|
||||
}
|
||||
|
||||
void FImageTexture::SetFromImage()
|
||||
{
|
||||
auto img = mImage;
|
||||
Width = img->GetWidth();
|
||||
Height = img->GetHeight();
|
||||
|
||||
auto offsets = img->GetOffsets();
|
||||
_LeftOffset[1] = _LeftOffset[0] = offsets.first;
|
||||
_TopOffset[1] = _TopOffset[0] = offsets.second;
|
||||
|
||||
bMasked = img->bMasked;
|
||||
bTranslucent = img->bTranslucent;
|
||||
}
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue