- cleaned the texture manager's method interface from FTexture references.

This commit is contained in:
Christoph Oelckers 2020-04-15 23:36:43 +02:00
commit 7bdef7fe9a
20 changed files with 179 additions and 178 deletions

View file

@ -57,7 +57,7 @@ void FCanvasTextureInfo::Add (AActor *viewpoint, FTextureID picnum, double fov)
{
return;
}
texture = static_cast<FCanvasTexture *>(TexMan.GetTexture(picnum));
texture = static_cast<FCanvasTexture *>(TexMan.GetGameTexture(picnum)->GetTexture());
if (!texture->bHasCanvas)
{
Printf ("%s is not a valid target for a camera\n", texture->Name.GetChars());
@ -101,8 +101,8 @@ void SetCameraToTexture(AActor *viewpoint, const FString &texturename, double fo
if (textureid.isValid())
{
// Only proceed if the texture actually has a canvas.
FTexture *tex = TexMan.GetTexture(textureid);
if (tex && tex->isCanvas())
auto tex = TexMan.GetGameTexture(textureid);
if (tex && tex->isHardwareCanvas()) // Q: how to deal with the software renderer here?
{
viewpoint->Level->canvasTextureInfo.Add(viewpoint, textureid, fov);
}