2022-10-16 02:28:34 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#include "SparseVolumeTextureModule.h"
|
|
|
|
|
|
|
|
|
|
#include "SparseVolumeTextureOpenVDB.h"
|
|
|
|
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "SparseVolumeTextureModule"
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_MODULE(FSparseVolumeTextureModule, SparseVolumeTexture);
|
|
|
|
|
|
2023-04-13 10:50:12 -04:00
|
|
|
template<typename T>
|
|
|
|
|
static void RegisterOpenVDBGrid()
|
|
|
|
|
{
|
|
|
|
|
if (!T::isRegistered())
|
|
|
|
|
{
|
|
|
|
|
T::registerGrid();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-16 02:28:34 -04:00
|
|
|
void FSparseVolumeTextureModule::StartupModule()
|
|
|
|
|
{
|
2024-03-26 16:18:18 -04:00
|
|
|
#if PLATFORM_WINDOWS || PLATFORM_LINUX
|
2022-10-16 02:28:34 -04:00
|
|
|
// Global registration of the vdb types.
|
|
|
|
|
openvdb::initialize();
|
2024-03-26 16:18:18 -04:00
|
|
|
|
2023-04-13 10:50:12 -04:00
|
|
|
RegisterOpenVDBGrid<FOpenVDBHalf1Grid>();
|
|
|
|
|
RegisterOpenVDBGrid<FOpenVDBHalf2Grid>();
|
|
|
|
|
RegisterOpenVDBGrid<FOpenVDBHalf3Grid>();
|
|
|
|
|
RegisterOpenVDBGrid<FOpenVDBHalf4Grid>();
|
|
|
|
|
RegisterOpenVDBGrid<FOpenVDBFloat1Grid>();
|
|
|
|
|
RegisterOpenVDBGrid<FOpenVDBFloat2Grid>();
|
|
|
|
|
RegisterOpenVDBGrid<FOpenVDBFloat3Grid>();
|
|
|
|
|
RegisterOpenVDBGrid<FOpenVDBFloat4Grid>();
|
|
|
|
|
RegisterOpenVDBGrid<FOpenVDBDouble1Grid>();
|
|
|
|
|
RegisterOpenVDBGrid<FOpenVDBDouble2Grid>();
|
|
|
|
|
RegisterOpenVDBGrid<FOpenVDBDouble3Grid>();
|
|
|
|
|
RegisterOpenVDBGrid<FOpenVDBDouble4Grid>();
|
2022-10-16 02:28:34 -04:00
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FSparseVolumeTextureModule::ShutdownModule()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|