You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Copying //UE4/Dev-VR to //UE4/Main (Source: //UE4/Dev-VR @ 2940090)
#lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2897367 on 2016/03/07 by Chad.Taylor@Chad.Taylor_Z3299_Tango PS4Tracker Submit call now assigning the appropriate memory type read mode Change 2920696 on 2016/03/23 by Nick.Whiting@nick.whiting_T7326_DevVRStream Fixed analytics event for VRPIE to have a description #jira UE-28562 Change 2925395 on 2016/03/28 by Chad.Taylor@Chad.Taylor_Z3299_Tango Aspect ratio and buffer clearing fixed up to properly handle non-standard viewport configurations. #jira UE-28816 Change 2932703 on 2016/04/04 by Nick.Whiting@nick.whiting_T7326_DevVRStream Merging CL 2922134, fix for culling because of stale view matrices Change 2932761 on 2016/04/04 by Nick.Whiting@nick.whiting_T7326_DevVRStream Oculus 1.3 Engine support, merged from 4.11 stream Change 2932762 on 2016/04/04 by Nick.Whiting@nick.whiting_T7326_DevVRStream Removing redundant libraries for Oculus LibOVRMobile Change 2932765 on 2016/04/04 by Nick.Whiting@nick.whiting_T7326_DevVRStream Merging updated license files for Oculus libraries Change 2938342 on 2016/04/08 by Ryan.Vance@ryan.vance_devvr Fixing bloom offset in stereo. Change 2938427 on 2016/04/08 by Ryan.Vance@ryan.vance_devvr Adding PSVR support for changing the screen percentage dynamically. Previously it could only be changed with ini settings and a relaunch. Reworked mutex use in reprojection thread. Some things weren't locked that should have been and removed a redundant mutex. Change 2938736 on 2016/04/08 by Ryan.Vance@ryan.vance_devvr #jira UE-26722 Updating ISR related code for debug view to fix tesselation. Change 2939709 on 2016/04/11 by Chad.Taylor@Chad.Taylor_Z3299_Tango Explicit order prioritization for ISceneViewExtensions for proper sampling order Change 2939717 on 2016/04/11 by Chad.Taylor@Chad.Taylor_Z3299_Tango Initial stereo layer implementation sans editor wireframe visualization Change 2939816 on 2016/04/11 by Chad.Taylor@Chad.Taylor_Z3299_Tango Stereo layer compionent visualizer [CL 2940449 by Nick Whiting in Main branch]
This commit is contained in:
committed by
Nick.Whiting@epicgames.com
parent
daef2a0d7a
commit
d64cd6df6d
108
Engine/Source/ThirdParty/Oculus/Common/AsyncLoadingSplash.h
vendored
Normal file
108
Engine/Source/ThirdParty/Oculus/Common/AsyncLoadingSplash.h
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "TickableObjectRenderThread.h"
|
||||
|
||||
// Base class for asynchronous loading splash.
|
||||
class FAsyncLoadingSplash : public TSharedFromThis<FAsyncLoadingSplash>, public FGCObject
|
||||
{
|
||||
protected:
|
||||
class FTicker : public FTickableObjectRenderThread, public TSharedFromThis<FTicker>
|
||||
{
|
||||
public:
|
||||
FTicker(FAsyncLoadingSplash* InSplash) : FTickableObjectRenderThread(false, true), pSplash(InSplash) {}
|
||||
|
||||
virtual void Tick(float DeltaTime) override { pSplash->Tick(DeltaTime); }
|
||||
virtual TStatId GetStatId() const override { RETURN_QUICK_DECLARE_CYCLE_STAT(FAsyncLoadingSplash, STATGROUP_Tickables); }
|
||||
virtual bool IsTickable() const override { return pSplash->IsTickable(); }
|
||||
protected:
|
||||
FAsyncLoadingSplash* pSplash;
|
||||
};
|
||||
|
||||
public:
|
||||
USTRUCT()
|
||||
struct FSplashDesc
|
||||
{
|
||||
UPROPERTY()
|
||||
UTexture2D* LoadingTexture; // a UTexture pointer, either loaded manually or passed externally.
|
||||
FString TexturePath; // a path to a texture for auto loading, can be empty if LoadingTexture is specified explicitly
|
||||
FTransform TransformInMeters; // transform of center of quad (meters)
|
||||
FVector2D QuadSizeInMeters; // dimensions in meters
|
||||
FQuat DeltaRotation; // a delta rotation that will be added each rendering frame (half rate of full vsync)
|
||||
|
||||
FSplashDesc() : LoadingTexture(nullptr)
|
||||
, TransformInMeters(FVector(4.0f, 0.f, 0.f))
|
||||
, QuadSizeInMeters(3.f, 3.f)
|
||||
, DeltaRotation(FQuat::Identity)
|
||||
{
|
||||
}
|
||||
bool operator==(const FSplashDesc& d) const
|
||||
{
|
||||
return LoadingTexture == d.LoadingTexture && TexturePath == d.TexturePath &&
|
||||
TransformInMeters.Equals(d.TransformInMeters) &&
|
||||
QuadSizeInMeters == d.QuadSizeInMeters && DeltaRotation.Equals(d.DeltaRotation);
|
||||
}
|
||||
};
|
||||
|
||||
FAsyncLoadingSplash();
|
||||
virtual ~FAsyncLoadingSplash();
|
||||
|
||||
// FGCObject interface
|
||||
virtual void AddReferencedObjects(FReferenceCollector& Collector) override;
|
||||
// End of FGCObject interface
|
||||
|
||||
// FTickableObjectRenderThread implementation
|
||||
virtual void Tick(float DeltaTime) {}
|
||||
virtual bool IsTickable() const { return IsLoadingStarted() && !IsDone(); }
|
||||
// End of FTickableObjectRenderThread interface
|
||||
|
||||
virtual void Startup();
|
||||
virtual void Shutdown();
|
||||
|
||||
virtual bool IsLoadingStarted() const { return LoadingStarted; }
|
||||
virtual bool IsDone() const { return LoadingCompleted; }
|
||||
|
||||
virtual void OnLoadingBegins();
|
||||
virtual void OnLoadingEnds();
|
||||
|
||||
virtual bool AddSplash(const FSplashDesc&);
|
||||
virtual void ClearSplashes();
|
||||
virtual bool GetSplash(unsigned index, FSplashDesc& OutDesc);
|
||||
|
||||
virtual void SetAutoShow(bool bInAuto) { bAutoShow = bInAuto; }
|
||||
virtual bool IsAutoShow() const { return bAutoShow; }
|
||||
|
||||
enum EShowType
|
||||
{
|
||||
None,
|
||||
ShowAtLoading,
|
||||
ShowManually
|
||||
};
|
||||
|
||||
virtual void Show(enum EShowType) = 0;
|
||||
virtual void Hide(enum EShowType) = 0;
|
||||
|
||||
// delegate method, called when loading begins
|
||||
void OnPreLoadMap() { OnLoadingBegins(); }
|
||||
|
||||
// delegate method, called when loading ends
|
||||
void OnPostLoadMap() { OnLoadingEnds(); }
|
||||
|
||||
protected:
|
||||
void LoadTexture(FSplashDesc& InSplashDesc);
|
||||
void UnloadTexture(FSplashDesc& InSplashDesc);
|
||||
|
||||
TSharedPtr<FTicker> RenTicker;
|
||||
|
||||
const int32 SPLASH_MAX_NUM = 10;
|
||||
|
||||
mutable FCriticalSection SplashScreensLock;
|
||||
UPROPERTY()
|
||||
TArray<FSplashDesc> SplashScreenDescs;
|
||||
|
||||
FThreadSafeBool LoadingCompleted;
|
||||
FThreadSafeBool LoadingStarted;
|
||||
bool bAutoShow; // whether or not show splash screen automatically (when LoadMap is called)
|
||||
bool bInitialized;
|
||||
};
|
||||
Reference in New Issue
Block a user