hi, i am a newer doing project on ue4.5
Now i need to render the cube to a image. And the render texture can not use MSAA, So i need to render the vireport six times and capture viewport and merge the six image to a cubemap.
I change new render window to 1024 * 1024 mode(cubemap must be width == height).
But i found that FViewPort::ReadPixels crash while play on “standalone Game” mode and runs well on “Selected Viewport” mode.(“Selected Viewport” mode could not resize window to 1024 * 1024)
why FViewPort::ReadPixels crash? the crash message is: counld not located import “SetCheckUserInterruptShared” on dbgeng.dll
My code like this:
UWorld* world = GetWorld();
if (world)
{
UGameViewportClient* viewportClient = GEngine->GameViewportForWorld(world);
FSceneViewport* svp = viewportClient->GetGameViewport();
TArray<FColor> left;
svp->ReadPixels(left, FReadSurfaceDataFlags());
}
And i confirm the svp not NULL.
My os is windows 8.
Sorry for my poor english.
Thankyou.