Files
UnrealEngineUWP/Engine/Source/Developer/HTML5/HTML5TargetPlatform/Private/HTML5TargetPlatform.h
Peter Sauerbrei b8f1f7c9b3 implement IsSDKInstalled on HTML5 target platform
#ue4
#html5

[CL 2111845 by Peter Sauerbrei in Main branch]
2014-06-20 11:47:12 -04:00

116 lines
3.3 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
HTML5TargetPlatform.h: Declares the FHTML5TargetPlatform class.
=============================================================================*/
#pragma once
#if WITH_ENGINE
#include "StaticMeshResources.h"
#endif // WITH_ENGINE
/**
* Implements the HTML5 target platform.
*/
class FHTML5TargetPlatform
: public TTargetPlatformBase<FHTML5PlatformProperties>
{
public:
/**
* Default constructor.
*/
FHTML5TargetPlatform( );
public:
// Begin ITargetPlatform interface
virtual void EnableDeviceCheck(bool OnOff) override {}
virtual void GetAllDevices( TArray<ITargetDevicePtr>& OutDevices ) const override;
virtual ECompressionFlags GetBaseCompressionMethod( ) const override;
virtual bool GenerateStreamingInstallManifest(const TMultiMap<FString, int32>& ChunkMap, const TSet<int32>& ChunkIDsInUse) const override
{
return true;
}
virtual ITargetDevicePtr GetDefaultDevice( ) const override;
virtual ITargetDevicePtr GetDevice( const FTargetDeviceId& DeviceId ) override;
virtual bool IsRunningPlatform( ) const override;
virtual bool SupportsFeature( ETargetPlatformFeatures::Type Feature ) const override
{
if (Feature == ETargetPlatformFeatures::Packaging)
{
return true;
}
return TTargetPlatformBase<FHTML5PlatformProperties>::SupportsFeature(Feature);
}
virtual bool IsSdkInstalled(bool bProjectHasCode, FString& OutDocumentationPath) const override;
#if WITH_ENGINE
virtual void GetAllPossibleShaderFormats( TArray<FName>& OutFormats ) const override;
virtual void GetAllTargetedShaderFormats( TArray<FName>& OutFormats ) const override;
virtual const class FStaticMeshLODSettings& GetStaticMeshLODSettings() const override;
virtual void GetTextureFormats( const UTexture* InTexture, TArray<FName>& OutFormats ) const override;
virtual void GetReflectionCaptureFormats( TArray<FName>& OutFormats ) const override
{
OutFormats.Add(FName(TEXT("EncodedHDR")));
}
virtual const struct FTextureLODSettings& GetTextureLODSettings( ) const override;
virtual FName GetWaveFormat( class USoundWave* Wave ) const override;
#endif // WITH_ENGINE
DECLARE_DERIVED_EVENT(FHTML5TargetPlatform, ITargetPlatform::FOnTargetDeviceDiscovered, FOnTargetDeviceDiscovered);
virtual FOnTargetDeviceDiscovered& OnDeviceDiscovered( ) override
{
return DeviceDiscoveredEvent;
}
DECLARE_DERIVED_EVENT(FHTML5TargetPlatform, ITargetPlatform::FOnTargetDeviceLost, FOnTargetDeviceLost);
virtual FOnTargetDeviceLost& OnDeviceLost( ) override
{
return DeviceLostEvent;
}
// End ITargetPlatform interface
private:
// Holds the HTML5 engine settings.
FConfigFile HTML5EngineSettings;
// Holds the local device.
FHTML5TargetDevicePtr LocalDevice;
#if WITH_ENGINE
// Holds the cached target LOD settings.
FTextureLODSettings HTML5LODSettings;
// Holds the static mesh LOD settings.
FStaticMeshLODSettings StaticMeshLODSettings;
#endif
private:
// Holds an event delegate that is executed when a new target device has been discovered.
FOnTargetDeviceDiscovered DeviceDiscoveredEvent;
// Holds an event delegate that is executed when a target device has been lost, i.e. disconnected or timed out.
FOnTargetDeviceLost DeviceLostEvent;
};