/// <summary> /// Returns a Canvas object that can be used to draw to the specified render target. /// Be sure to call EndDrawCanvasToRenderTarget to complete the rendering! /// </summary> public static void BeginDrawCanvasToRenderTarget(UObject WorldContextObject, UTextureRenderTarget2D TextureRenderTarget, out UCanvas Canvas, out FVector2D Size, out FDrawToRenderTargetContext Context) { IntPtr Canvas_temp; BeginDrawCanvasToRenderTarget(IntPtr.Zero, WorldContextObject, TextureRenderTarget, out Canvas_temp, out Size, out Context); Canvas = new UCanvas() { _this = Canvas_temp }; }
/// <summary>Creates a new render target and initializes it to the specified dimensions</summary> public static UTextureRenderTarget2D CreateRenderTarget2D(UObject WorldContextObject, int Width = 256, int Height = 256) { IntPtr ___ret = CreateRenderTarget2D(IntPtr.Zero, WorldContextObject, Width, Height); if (___ret == IntPtr.Zero) { return(null); } UTextureRenderTarget2D ___ret2 = new UTextureRenderTarget2D() { _this = ___ret }; return(___ret2); }
/// <summary>@return The render target to which the user widget is rendered</summary> public UTextureRenderTarget2D GetRenderTarget() { CheckIsValid(); IntPtr ___ret = GetRenderTarget(_this.Get()); if (___ret == IntPtr.Zero) { return(null); } UTextureRenderTarget2D ___ret2 = new UTextureRenderTarget2D() { _this = ___ret }; return(___ret2); }
/// <summary>Clears the specified render target with the given ClearColor.</summary> public static void ClearRenderTarget2D(UObject WorldContextObject, UTextureRenderTarget2D TextureRenderTarget, FLinearColor ClearColor) { ClearRenderTarget2D(IntPtr.Zero, WorldContextObject, TextureRenderTarget, ref ClearColor); }
/// <summary> /// Renders a quad with the material applied to the specified render target. /// This sets the render target even if it is already set, which is an expensive operation. /// Use BeginDrawCanvasToRenderTarget / EndDrawCanvasToRenderTarget instead if rendering multiple primitives to the same render target. /// </summary> public static void DrawMaterialToRenderTarget(UObject WorldContextObject, UTextureRenderTarget2D TextureRenderTarget, UMaterialInterface Material) { DrawMaterialToRenderTarget(IntPtr.Zero, WorldContextObject, TextureRenderTarget, Material); }
/// <summary>Exports a render target as a HDR image onto the disk.</summary> public static void ExportRenderTarget(UObject WorldContextObject, UTextureRenderTarget2D TextureRenderTarget, string FilePath, string FileName) { ExportRenderTarget(IntPtr.Zero, WorldContextObject, TextureRenderTarget, FilePath, FileName); }
/// <summary> /// Copies the contents of a render target to a UTexture2D /// Only works in the editor /// </summary> public static void ConvertRenderTargetToTexture2DEditorOnly(UObject WorldContextObject, UTextureRenderTarget2D RenderTarget, UTexture2D Texture) { ConvertRenderTargetToTexture2DEditorOnly(IntPtr.Zero, WorldContextObject, RenderTarget, Texture); }
/// <summary>Clears the specified render target with the given ClearColor.</summary> public extern static void ClearRenderTarget2D(UObject WorldContextObject, UTextureRenderTarget2D TextureRenderTarget, FLinearColor ClearColor = default(FLinearColor));
/// <summary> /// Renders a quad with the material applied to the specified render target. /// This sets the render target even if it is already set, which is an expensive operation. /// Use BeginDrawCanvasToRenderTarget / EndDrawCanvasToRenderTarget instead if rendering multiple primitives to the same render target. /// </summary> public extern static void DrawMaterialToRenderTarget(UObject WorldContextObject, UTextureRenderTarget2D TextureRenderTarget, UMaterialInterface Material);
/// <summary>Exports a render target as a HDR image onto the disk.</summary> public extern static void ExportRenderTarget(UObject WorldContextObject, UTextureRenderTarget2D TextureRenderTarget, FString FilePath, FString FileName);
/// <summary> /// Returns a Canvas object that can be used to draw to the specified render target. /// Canvas has functions like DrawMaterial with size parameters that can be used to draw to a specific area of a render target. /// Be sure to call EndDrawCanvasToRenderTarget to complete the rendering! /// </summary> public extern static void BeginDrawCanvasToRenderTarget(UObject WorldContextObject, UTextureRenderTarget2D TextureRenderTarget, out UCanvas Canvas, out FVector2D Size, out FDrawToRenderTargetContext Context);