Add canvastexture definition to animdefs.

Split canvas texture rendering from camera texture rendering.
This commit is contained in:
Magnus Norddahl 2022-07-23 20:49:21 +02:00 committed by Christoph Oelckers
commit bb503950df
15 changed files with 111 additions and 54 deletions

View file

@ -102,15 +102,15 @@ DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, SetCameraTextureAspectRatio, SetCameraTex
return 0;
}
void SetCanvasToTexture(FCanvas* canvas, const FString& texturename);
FCanvas* GetTextureCanvas(const FString& texturename);
DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, SetCanvasToTexture, SetCanvasToTexture)
DEFINE_ACTION_FUNCTION(_TexMan, GetCanvas)
{
PARAM_PROLOGUE;
PARAM_OBJECT(canvas, FCanvas);
PARAM_STRING(texturename);
SetCanvasToTexture(canvas, texturename);
return 0;
FCanvas* canvas = GetTextureCanvas(texturename);
if (numret > 0) ret[0].SetPointer(canvas);
return numret;
}
//=====================================================================================