You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Initial use case is to move the runtime virtual texture low mips building out of specific runtime virtual texture code. #ROBOMERGE-SOURCE: CL 12765051 via CL 12765067 via CL 12765074 via CL 12765082 #ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v678-12743200) [CL 12765102 by jeremy moore in Main branch]
28 lines
1.2 KiB
C++
28 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "VirtualTextureBuilderThumbnailRenderer.h"
|
|
#include "VT/VirtualTexture.h"
|
|
#include "VT/VirtualTextureBuilder.h"
|
|
|
|
UVirtualTextureBuilderThumbnailRenderer::UVirtualTextureBuilderThumbnailRenderer(const FObjectInitializer& ObjectInitializer)
|
|
: Super(ObjectInitializer)
|
|
{
|
|
}
|
|
|
|
bool UVirtualTextureBuilderThumbnailRenderer::CanVisualizeAsset(UObject* Object)
|
|
{
|
|
UVirtualTextureBuilder* VirtualTextureBuilder = Cast<UVirtualTextureBuilder>(Object);
|
|
UVirtualTexture2D* Texture = VirtualTextureBuilder != nullptr ? VirtualTextureBuilder->Texture : nullptr;
|
|
return Texture != nullptr ? UTextureThumbnailRenderer::CanVisualizeAsset(Texture) : false;
|
|
}
|
|
|
|
void UVirtualTextureBuilderThumbnailRenderer::Draw(UObject* Object, int32 X, int32 Y, uint32 Width, uint32 Height, FRenderTarget* RenderTarget, FCanvas* Canvas, bool bAdditionalViewFamily)
|
|
{
|
|
UVirtualTextureBuilder* VirtualTextureBuilder = Cast<UVirtualTextureBuilder>(Object);
|
|
UVirtualTexture2D* Texture = VirtualTextureBuilder != nullptr ? VirtualTextureBuilder->Texture : nullptr;
|
|
if (Texture != nullptr)
|
|
{
|
|
UTextureThumbnailRenderer::Draw(Texture, X, Y, Width, Height, RenderTarget, Canvas, bAdditionalViewFamily);
|
|
}
|
|
}
|