You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
27 lines
945 B
C++
27 lines
945 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreTypes.h"
|
|
#include "Interfaces/ITextureFormatManagerModule.h"
|
|
#include "Modules/ModuleManager.h"
|
|
|
|
/** Return the Texture Format Manager interface, if it is available, otherwise return nullptr. **/
|
|
inline ITextureFormatManagerModule* GetTextureFormatManager()
|
|
{
|
|
return FModuleManager::LoadModulePtr<ITextureFormatManagerModule>("TextureFormat");
|
|
}
|
|
|
|
/** Return the Texture Format Manager interface, fatal error if it is not available. **/
|
|
inline ITextureFormatManagerModule& GetTextureFormatManagerRef()
|
|
{
|
|
class ITextureFormatManagerModule* TextureFormatManager = GetTextureFormatManager();
|
|
if (!TextureFormatManager)
|
|
{
|
|
UE_LOG(LogInit, Fatal, TEXT("Texture format manager was requested, but not available."));
|
|
CA_ASSUME( TextureFormatManager != NULL ); // Suppress static analysis warning in unreachable code (fatal error)
|
|
}
|
|
return *TextureFormatManager;
|
|
}
|
|
|