UWP support

This commit is contained in:
Jack Andersen 2017-12-05 17:26:15 -10:00
parent ee5ca06830
commit 1cb36fc37a
22 changed files with 171 additions and 46 deletions

View File

@ -691,6 +691,7 @@ bool MREA::PCCook(const hecl::ProjectPath& outPath,
} }
} }
#if !WINDOWS_STORE
if (!visiGood) if (!visiGood)
{ {
hecl::ProjectPath visiIntOut = outPath.getWithExtension(_S(".visiint")); hecl::ProjectPath visiIntOut = outPath.getWithExtension(_S(".visiint"));
@ -764,6 +765,7 @@ bool MREA::PCCook(const hecl::ProjectPath& outPath,
Log.report(logvisor::Fatal, _S("Unable to launch %s"), VisiGenPath.c_str()); Log.report(logvisor::Fatal, _S("Unable to launch %s"), VisiGenPath.c_str());
} }
} }
#endif
} }
} }
if (!visiGood) if (!visiGood)

View File

@ -12,6 +12,18 @@ atdna(atdna_GameMode.cpp GameMode.hpp)
if(WIN32) if(WIN32)
set(PLAT_SRCS platforms/win/urde.rc) set(PLAT_SRCS platforms/win/urde.rc)
if(WINDOWS_STORE)
set(UWP_ASSETS
platforms/win/Assets/Square150x150Logo.scale-100.png
platforms/win/Assets/Square150x150Logo.scale-125.png
platforms/win/Assets/Square150x150Logo.scale-150.png
platforms/win/Assets/Square150x150Logo.scale-200.png
platforms/win/Assets/Square150x150Logo.scale-400.png)
set_property(SOURCE platforms/win/Package.appxmanifest PROPERTY VS_DEPLOYMENT_CONTENT 1)
set_property(SOURCE ${UWP_ASSETS} PROPERTY VS_DEPLOYMENT_CONTENT 1)
set_property(SOURCE ${UWP_ASSETS} PROPERTY VS_DEPLOYMENT_LOCATION "Assets")
list(APPEND PLAT_SRCS ${UWP_ASSETS} platforms/win/Package.appxmanifest)
endif()
elseif(APPLE) elseif(APPLE)
set(PLAT_SRCS platforms/mac/mainicon.icns) set(PLAT_SRCS platforms/mac/mainicon.icns)
set_source_files_properties(platforms/mac/mainicon.icns PROPERTIES set_source_files_properties(platforms/mac/mainicon.icns PROPERTIES
@ -51,11 +63,20 @@ target_link_libraries(urde
set_target_properties(urde PROPERTIES set_target_properties(urde PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/platforms/mac/Info.plist") MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/platforms/mac/Info.plist")
add_dependencies(urde visigen hecl) if (NOT WINDOWS_STORE)
add_dependencies(urde visigen hecl)
add_custom_command(TARGET urde POST_BUILD add_custom_command(TARGET urde POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:visigen> $<TARGET_FILE_DIR:urde>) COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:visigen> $<TARGET_FILE_DIR:urde>)
add_custom_command(TARGET urde POST_BUILD add_custom_command(TARGET urde POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:visigen> $<TARGET_FILE_DIR:hecl>) COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:visigen> $<TARGET_FILE_DIR:hecl>)
add_custom_command(TARGET urde POST_BUILD add_custom_command(TARGET urde POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:hecl> $<TARGET_FILE_DIR:urde>) COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:hecl> $<TARGET_FILE_DIR:urde>)
else()
message(STATUS "Targeting Windows 10. Setting Extensions to version ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
set_property(TARGET urde PROPERTY VS_WINRT_COMPONENT TRUE)
set_property(TARGET urde PROPERTY VS_DESKTOP_EXTENSIONS_VERSION "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
set_property(TARGET urde PROPERTY VS_MOBILE_EXTENSIONS_VERSION "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
set_property(TARGET urde PROPERTY VS_IOT_EXTENSIONS_VERSION "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
# Add a reference to an SDK
set_property(TARGET urde PROPERTY VS_SDK_REFERENCES "Microsoft.UniversalCRT.Debug, Version=${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
endif()

View File

@ -1,5 +1,4 @@
cmake_policy(SET CMP0053 OLD) if(NOT WINDOWS_STORE)
include_directories(${LIBPNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) include_directories(${LIBPNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
add_executable(packicons packicons.c) add_executable(packicons packicons.c)
target_link_libraries(packicons ${PNG_LIB} ${ZLIB_LIBRARIES}) target_link_libraries(packicons ${PNG_LIB} ${ZLIB_LIBRARIES})
@ -10,7 +9,7 @@ if(WIN32)
find_program(INKSCAPE_BIN inkscape.exe PATHS find_program(INKSCAPE_BIN inkscape.exe PATHS
"$ENV{PROGRAMFILES}/Inkscape" "$ENV{PROGRAMFILES}/Inkscape"
"$ENV{ProgramW6432}/Inkscape" "$ENV{ProgramW6432}/Inkscape"
"$ENV{PROGRAMFILES(X86)}/Inkscape") "$ENV{PROGRAMFILES\(X86\)}/Inkscape")
else() else()
set(CMAKE_FIND_APPBUNDLE FIRST) set(CMAKE_FIND_APPBUNDLE FIRST)
find_program(INKSCAPE_BIN inkscape) find_program(INKSCAPE_BIN inkscape)
@ -25,6 +24,10 @@ else()
${CMAKE_CURRENT_BINARY_DIR}/icons.bin ${CMAKE_CURRENT_BINARY_DIR}/icons.bin
MAIN_DEPENDENCY icons.svg COMMENT "Generating icons.bin") MAIN_DEPENDENCY icons.svg COMMENT "Generating icons.bin")
endif() endif()
else()
add_custom_command(OUTPUT icons.bin COMMAND ${CMAKE_COMMAND} ARGS -P
${CMAKE_CURRENT_SOURCE_DIR}/IconDownload.cmake)
endif()
bintoc(icons.c ${CMAKE_CURRENT_BINARY_DIR}/icons.bin URDE_ICONS) bintoc(icons.c ${CMAKE_CURRENT_BINARY_DIR}/icons.bin URDE_ICONS)
add_library(UrdeIcons icons.cpp icons.hpp icons.bin icons.c) add_library(UrdeIcons icons.cpp icons.hpp icons.bin icons.c)

View File

@ -136,16 +136,13 @@ static void SetupBasics(bool logging)
static bool IsClientLoggingEnabled(int argc, const boo::SystemChar** argv) static bool IsClientLoggingEnabled(int argc, const boo::SystemChar** argv)
{ {
bool logging = false;
for (int i = 1; i < argc; ++i) for (int i = 1; i < argc; ++i)
if (!hecl::StrNCmp(argv[i], _S("-l"), 2)) if (!hecl::StrNCmp(argv[i], _S("-l"), 2))
{ return true;
logging = true; return false;
break;
}
return logging;
} }
#if !WINDOWS_STORE
#if _WIN32 #if _WIN32
int wmain(int argc, const boo::SystemChar** argv) int wmain(int argc, const boo::SystemChar** argv)
#else #else
@ -170,16 +167,17 @@ int main(int argc, const boo::SystemChar** argv)
printf("IM DYING!!\n"); printf("IM DYING!!\n");
return ret; return ret;
} }
#endif
#if WINAPI_FAMILY && !WINAPI_PARTITION_DESKTOP #if WINDOWS_STORE
using namespace Windows::ApplicationModel::Core; using namespace Windows::ApplicationModel::Core;
[Platform::MTAThread] [Platform::MTAThread]
int WINAPIV main(Platform::Array<Platform::String^>^ params) int WINAPIV main(Platform::Array<Platform::String^>^ params)
{ {
SetupBasics(); SetupBasics(false);
urde::Application appCb; urde::Application appCb;
auto viewProvider = ref new ViewProvider(appCb, _S("urde"), _S("URDE"), params, false); auto viewProvider = ref new boo::ViewProvider(appCb, _S("urde"), _S("URDE"), _S("urde"), params, false);
CoreApplication::Run(viewProvider); CoreApplication::Run(viewProvider);
return 0; return 0;
} }

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
<Identity Name="AxioDL.URDE"
Version="1.0.0.0"
Publisher="CN=URDE, O=URDE" />
<Properties>
<DisplayName>URDE</DisplayName>
<PublisherDisplayName>AxioDL</PublisherDisplayName>
</Properties>
<Resources>
<Resource Language="en-us" />
</Resources>
<Applications>
<Application Id="URDE" StartPage="">
<VisualElements
DisplayName="URDE"
Description="Game engine recreation for Metroid Prime"
Square310x310Logo="Tiles\Square310x310Logo.png"
Wide310x150Logo="Tiles\Wide310x150Logo.png"
Square150x150Logo="Tiles\Square150x150Logo.png"
Square71x71Logo="Tiles\Square71x71Logo.png"
Square44x44Logo="Tiles\Square44x44Logo.png"
ForegroundText="light"
BackgroundColor="#333333">
<SplashScreen
BackgroundColor="#333333"
Image="Tiles\SplashScreen.png" />
</VisualElements>
</Application>
</Applications>
</Package>

View File

@ -4,11 +4,16 @@
namespace urde namespace urde
{ {
#if WINDOWS_STORE
using namespace Windows::Storage;
#endif
/* Partial path-selection logic from /* Partial path-selection logic from
* https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/UICommon/UICommon.cpp * https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/UICommon/UICommon.cpp
* Modified to not use dolphin-binary-relative paths. */ * Modified to not use dolphin-binary-relative paths. */
kabufuda::SystemString CMemoryCardSys::ResolveDolphinCardPath(kabufuda::ECardSlot slot) kabufuda::SystemString CMemoryCardSys::ResolveDolphinCardPath(kabufuda::ECardSlot slot)
{ {
#if !WINDOWS_STORE
/* Detect where the User directory is. There are two different cases /* Detect where the User directory is. There are two different cases
* 1. HKCU\Software\Dolphin Emulator\UserConfigPath exists * 1. HKCU\Software\Dolphin Emulator\UserConfigPath exists
* -> Use this as the user directory path * -> Use this as the user directory path
@ -41,6 +46,10 @@ kabufuda::SystemString CMemoryCardSys::ResolveDolphinCardPath(kabufuda::ECardSlo
path = kabufuda::SystemString(my_documents) + _S("/Dolphin Emulator"); path = kabufuda::SystemString(my_documents) + _S("/Dolphin Emulator");
else /* Unable to find */ else /* Unable to find */
return {}; return {};
#else
StorageFolder^ localFolder = ApplicationData::Current->LocalFolder;
kabufuda::SystemString path(localFolder->Path->Data());
#endif
path += hecl::SysFormat(_S("/GC/MemoryCard%c.USA.raw"), path += hecl::SysFormat(_S("/GC/MemoryCard%c.USA.raw"),
slot == kabufuda::ECardSlot::SlotA ? _S('A') : _S('B')); slot == kabufuda::ECardSlot::SlotA ? _S('A') : _S('B'));
@ -54,6 +63,7 @@ kabufuda::SystemString CMemoryCardSys::ResolveDolphinCardPath(kabufuda::ECardSlo
kabufuda::SystemString CMemoryCardSys::_CreateDolphinCard(kabufuda::ECardSlot slot) kabufuda::SystemString CMemoryCardSys::_CreateDolphinCard(kabufuda::ECardSlot slot)
{ {
#if !WINDOWS_STORE
/* Detect where the User directory is. There are two different cases /* Detect where the User directory is. There are two different cases
* 1. HKCU\Software\Dolphin Emulator\UserConfigPath exists * 1. HKCU\Software\Dolphin Emulator\UserConfigPath exists
* -> Use this as the user directory path * -> Use this as the user directory path
@ -86,6 +96,10 @@ kabufuda::SystemString CMemoryCardSys::_CreateDolphinCard(kabufuda::ECardSlot sl
path = kabufuda::SystemString(my_documents) + _S("/Dolphin Emulator"); path = kabufuda::SystemString(my_documents) + _S("/Dolphin Emulator");
else /* Unable to find */ else /* Unable to find */
return {}; return {};
#else
StorageFolder^ localFolder = ApplicationData::Current->LocalFolder;
kabufuda::SystemString path(localFolder->Path->Data());
#endif
path += _S("/GC"); path += _S("/GC");
if (hecl::RecursiveMakeDir(path.c_str()) < 0) if (hecl::RecursiveMakeDir(path.c_str()) < 0)

View File

@ -50,6 +50,33 @@ elseif(BOO_HAS_METAL)
Shaders/CWorldShadowShaderMetal.cpp) Shaders/CWorldShadowShaderMetal.cpp)
endif() endif()
if(NOT WINDOWS_STORE)
list(APPEND PLAT_SRCS
Shaders/CLineRendererShadersGLSL.cpp
Shaders/CTexturedQuadFilterGLSL.cpp
Shaders/CColoredQuadFilterGLSL.cpp
Shaders/CModelShadersGLSL.cpp
Shaders/CThermalColdFilterGLSL.cpp
Shaders/CThermalHotFilterGLSL.cpp
Shaders/CSpaceWarpFilterGLSL.cpp
Shaders/CCameraBlurFilterGLSL.cpp
Shaders/CXRayBlurFilterGLSL.cpp
Shaders/CTextSupportShaderGLSL.cpp
Shaders/CFogVolumePlaneShaderGLSL.cpp
Shaders/CFogVolumeFilterGLSL.cpp
Shaders/CEnergyBarShaderGLSL.cpp
Shaders/CRadarPaintShaderGLSL.cpp
Shaders/CMapSurfaceShaderGLSL.cpp
Shaders/CPhazonSuitFilterGLSL.cpp
Shaders/CScanLinesFilterGLSL.cpp
Shaders/CRandomStaticFilterGLSL.cpp
Shaders/CElementGenShadersGLSL.cpp
Shaders/CParticleSwooshShadersGLSL.cpp
Shaders/CFluidPlaneShaderGLSL.cpp
Shaders/CAABoxShaderGLSL.cpp
Shaders/CWorldShadowShaderGLSL.cpp)
endif()
set(GRAPHICS_SOURCES set(GRAPHICS_SOURCES
IRenderer.hpp IRenderer.hpp
IWeaponRenderer.hpp IWeaponRenderer.cpp IWeaponRenderer.hpp IWeaponRenderer.cpp
@ -71,30 +98,31 @@ set(GRAPHICS_SOURCES
CGraphics.hpp CGraphics.cpp CGraphics.hpp CGraphics.cpp
CSimpleShadow.hpp CSimpleShadow.cpp CSimpleShadow.hpp CSimpleShadow.cpp
CRainSplashGenerator.hpp CRainSplashGenerator.cpp CRainSplashGenerator.hpp CRainSplashGenerator.cpp
Shaders/TShader.hpp Shaders/TMultiBlendShader.hpp Shaders/TShaderDecl.hpp Shaders/TMultiBlendShaderDecl.hpp Shaders/TShader.hpp Shaders/TMultiBlendShader.hpp
Shaders/CLineRendererShaders.hpp Shaders/CLineRendererShaders.cpp Shaders/CLineRendererShadersGLSL.cpp Shaders/TShaderDecl.hpp Shaders/TMultiBlendShaderDecl.hpp
Shaders/CTexturedQuadFilter.hpp Shaders/CTexturedQuadFilter.cpp Shaders/CTexturedQuadFilterGLSL.cpp Shaders/CLineRendererShaders.hpp Shaders/CLineRendererShaders.cpp
Shaders/CColoredQuadFilter.hpp Shaders/CColoredQuadFilter.cpp Shaders/CColoredQuadFilterGLSL.cpp Shaders/CTexturedQuadFilter.hpp Shaders/CTexturedQuadFilter.cpp
Shaders/CModelShaders.hpp Shaders/CModelShaders.cpp Shaders/CModelShadersGLSL.cpp Shaders/CColoredQuadFilter.hpp Shaders/CColoredQuadFilter.cpp
Shaders/CThermalColdFilter.hpp Shaders/CThermalColdFilter.cpp Shaders/CThermalColdFilterGLSL.cpp Shaders/CModelShaders.hpp Shaders/CModelShaders.cpp
Shaders/CThermalHotFilter.hpp Shaders/CThermalHotFilter.cpp Shaders/CThermalHotFilterGLSL.cpp Shaders/CThermalColdFilter.hpp Shaders/CThermalColdFilter.cpp
Shaders/CSpaceWarpFilter.hpp Shaders/CSpaceWarpFilter.cpp Shaders/CSpaceWarpFilterGLSL.cpp Shaders/CThermalHotFilter.hpp Shaders/CThermalHotFilter.cpp
Shaders/CCameraBlurFilter.hpp Shaders/CCameraBlurFilter.cpp Shaders/CCameraBlurFilterGLSL.cpp Shaders/CSpaceWarpFilter.hpp Shaders/CSpaceWarpFilter.cpp
Shaders/CXRayBlurFilter.hpp Shaders/CXRayBlurFilter.cpp Shaders/CXRayBlurFilterGLSL.cpp Shaders/CCameraBlurFilter.hpp Shaders/CCameraBlurFilter.cpp
Shaders/CTextSupportShader.hpp Shaders/CTextSupportShader.cpp Shaders/CTextSupportShaderGLSL.cpp Shaders/CXRayBlurFilter.hpp Shaders/CXRayBlurFilter.cpp
Shaders/CFogVolumePlaneShader.hpp Shaders/CFogVolumePlaneShader.cpp Shaders/CFogVolumePlaneShaderGLSL.cpp Shaders/CTextSupportShader.hpp Shaders/CTextSupportShader.cpp
Shaders/CFogVolumeFilter.hpp Shaders/CFogVolumeFilter.cpp Shaders/CFogVolumeFilterGLSL.cpp Shaders/CFogVolumePlaneShader.hpp Shaders/CFogVolumePlaneShader.cpp
Shaders/CEnergyBarShader.hpp Shaders/CEnergyBarShader.cpp Shaders/CEnergyBarShaderGLSL.cpp Shaders/CFogVolumeFilter.hpp Shaders/CFogVolumeFilter.cpp
Shaders/CRadarPaintShader.hpp Shaders/CRadarPaintShader.cpp Shaders/CRadarPaintShaderGLSL.cpp Shaders/CEnergyBarShader.hpp Shaders/CEnergyBarShader.cpp
Shaders/CMapSurfaceShader.hpp Shaders/CMapSurfaceShader.cpp Shaders/CMapSurfaceShaderGLSL.cpp Shaders/CRadarPaintShader.hpp Shaders/CRadarPaintShader.cpp
Shaders/CPhazonSuitFilter.hpp Shaders/CPhazonSuitFilter.cpp Shaders/CPhazonSuitFilterGLSL.cpp Shaders/CMapSurfaceShader.hpp Shaders/CMapSurfaceShader.cpp
Shaders/CScanLinesFilter.hpp Shaders/CScanLinesFilter.cpp Shaders/CScanLinesFilterGLSL.cpp Shaders/CPhazonSuitFilter.hpp Shaders/CPhazonSuitFilter.cpp
Shaders/CRandomStaticFilter.hpp Shaders/CRandomStaticFilter.cpp Shaders/CRandomStaticFilterGLSL.cpp Shaders/CScanLinesFilter.hpp Shaders/CScanLinesFilter.cpp
Shaders/CElementGenShaders.hpp Shaders/CElementGenShaders.cpp Shaders/CElementGenShadersGLSL.cpp Shaders/CRandomStaticFilter.hpp Shaders/CRandomStaticFilter.cpp
Shaders/CParticleSwooshShaders.hpp Shaders/CParticleSwooshShaders.cpp Shaders/CParticleSwooshShadersGLSL.cpp Shaders/CElementGenShaders.hpp Shaders/CElementGenShaders.cpp
Shaders/CFluidPlaneShader.hpp Shaders/CFluidPlaneShader.cpp Shaders/CFluidPlaneShaderGLSL.cpp Shaders/CParticleSwooshShaders.hpp Shaders/CParticleSwooshShaders.cpp
Shaders/CAABoxShader.hpp Shaders/CAABoxShader.cpp Shaders/CAABoxShaderGLSL.cpp Shaders/CFluidPlaneShader.hpp Shaders/CFluidPlaneShader.cpp
Shaders/CWorldShadowShader.hpp Shaders/CWorldShadowShader.cpp Shaders/CWorldShadowShaderGLSL.cpp Shaders/CAABoxShader.hpp Shaders/CAABoxShader.cpp
Shaders/CWorldShadowShader.hpp Shaders/CWorldShadowShader.cpp
${PLAT_SRCS}) ${PLAT_SRCS})
runtime_add_list(Graphics GRAPHICS_SOURCES) runtime_add_list(Graphics GRAPHICS_SOURCES)

View File

@ -212,12 +212,14 @@ void CMoviePlayer::Initialize()
switch (ctx.platform()) switch (ctx.platform())
{ {
#if BOO_HAS_GL
case boo::IGraphicsDataFactory::Platform::OpenGL: case boo::IGraphicsDataFactory::Platform::OpenGL:
YUVShaderPipeline = static_cast<boo::GLDataFactory::Context&>(ctx).newShaderPipeline YUVShaderPipeline = static_cast<boo::GLDataFactory::Context&>(ctx).newShaderPipeline
(VS_GLSL_YUV, FS_GLSL_YUV, 3, TexNames, 1, BlockNames, (VS_GLSL_YUV, FS_GLSL_YUV, 3, TexNames, 1, BlockNames,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None); boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None);
break; break;
#endif
#if _WIN32 #if _WIN32
case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::Platform::D3D12: case boo::IGraphicsDataFactory::Platform::D3D12:

View File

@ -104,9 +104,11 @@ boo::ObjToken<boo::IShaderPipeline> CFluidPlaneShader::Cache::GetOrBuildShader(c
{ {
switch (ctx.platform()) switch (ctx.platform())
{ {
#if BOO_HAS_GL
case boo::IGraphicsDataFactory::Platform::OpenGL: case boo::IGraphicsDataFactory::Platform::OpenGL:
slot = BuildShader(static_cast<boo::GLDataFactory::Context&>(ctx), info); slot = BuildShader(static_cast<boo::GLDataFactory::Context&>(ctx), info);
break; break;
#endif
#if _WIN32 #if _WIN32
case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::Platform::D3D12: case boo::IGraphicsDataFactory::Platform::D3D12:
@ -154,9 +156,11 @@ void CFluidPlaneShader::PrepareBinding(const boo::ObjToken<boo::IShaderPipeline>
switch (ctx.platform()) switch (ctx.platform())
{ {
#if BOO_HAS_GL
case boo::IGraphicsDataFactory::Platform::OpenGL: case boo::IGraphicsDataFactory::Platform::OpenGL:
m_dataBind = BuildBinding(static_cast<boo::GLDataFactory::Context&>(ctx), pipeline, door); m_dataBind = BuildBinding(static_cast<boo::GLDataFactory::Context&>(ctx), pipeline, door);
break; break;
#endif
#if _WIN32 #if _WIN32
case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::Platform::D3D12: case boo::IGraphicsDataFactory::Platform::D3D12:

View File

@ -117,12 +117,14 @@ private:
boo::ObjToken<boo::IGraphicsBufferD> m_uniBuf; boo::ObjToken<boo::IGraphicsBufferD> m_uniBuf;
boo::ObjToken<boo::IShaderDataBinding> m_dataBind; boo::ObjToken<boo::IShaderDataBinding> m_dataBind;
#if BOO_HAS_GL
static boo::ObjToken<boo::IShaderPipeline> BuildShader(boo::GLDataFactory::Context& ctx, static boo::ObjToken<boo::IShaderPipeline> BuildShader(boo::GLDataFactory::Context& ctx,
const SFluidPlaneShaderInfo& info); const SFluidPlaneShaderInfo& info);
static boo::ObjToken<boo::IShaderPipeline> BuildShader(boo::GLDataFactory::Context& ctx, static boo::ObjToken<boo::IShaderPipeline> BuildShader(boo::GLDataFactory::Context& ctx,
const SFluidPlaneDoorShaderInfo& info); const SFluidPlaneDoorShaderInfo& info);
boo::ObjToken<boo::IShaderDataBinding> BuildBinding(boo::GLDataFactory::Context& ctx, boo::ObjToken<boo::IShaderDataBinding> BuildBinding(boo::GLDataFactory::Context& ctx,
const boo::ObjToken<boo::IShaderPipeline>& pipeline, bool door); const boo::ObjToken<boo::IShaderPipeline>& pipeline, bool door);
#endif
#if _WIN32 #if _WIN32
static boo::ObjToken<boo::IShaderPipeline> BuildShader(boo::ID3DDataFactory::Context& ctx, static boo::ObjToken<boo::IShaderPipeline> BuildShader(boo::ID3DDataFactory::Context& ctx,
const SFluidPlaneShaderInfo& info); const SFluidPlaneShaderInfo& info);

View File

@ -24,9 +24,11 @@ void CLineRendererShaders::Initialize()
{ {
switch (ctx.platform()) switch (ctx.platform())
{ {
#if BOO_HAS_GL
case boo::IGraphicsDataFactory::Platform::OpenGL: case boo::IGraphicsDataFactory::Platform::OpenGL:
m_bindFactory.reset(Initialize(static_cast<boo::GLDataFactory::Context&>(ctx))); m_bindFactory.reset(Initialize(static_cast<boo::GLDataFactory::Context&>(ctx)));
break; break;
#endif
#if _WIN32 #if _WIN32
case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::Platform::D3D12: case boo::IGraphicsDataFactory::Platform::D3D12:

View File

@ -35,7 +35,9 @@ private:
static std::unique_ptr<IDataBindingFactory> m_bindFactory; static std::unique_ptr<IDataBindingFactory> m_bindFactory;
public: public:
#if BOO_HAS_GL
static IDataBindingFactory* Initialize(boo::GLDataFactory::Context& ctx); static IDataBindingFactory* Initialize(boo::GLDataFactory::Context& ctx);
#endif
#if _WIN32 #if _WIN32
static IDataBindingFactory* Initialize(boo::ID3DDataFactory::Context& ctx); static IDataBindingFactory* Initialize(boo::ID3DDataFactory::Context& ctx);
#endif #endif

View File

@ -58,9 +58,11 @@ CModelShaders::GetShaderExtensions(boo::IGraphicsDataFactory::Platform plat)
{ {
switch (plat) switch (plat)
{ {
#if BOO_HAS_GL
case boo::IGraphicsDataFactory::Platform::OpenGL: case boo::IGraphicsDataFactory::Platform::OpenGL:
case boo::IGraphicsDataFactory::Platform::Vulkan: case boo::IGraphicsDataFactory::Platform::Vulkan:
return GetShaderExtensionsGLSL(plat); return GetShaderExtensionsGLSL(plat);
#endif
#if _WIN32 #if _WIN32
case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::Platform::D3D12: case boo::IGraphicsDataFactory::Platform::D3D12:

View File

@ -33,9 +33,11 @@ public:
{ {
switch (ctx.platform()) switch (ctx.platform())
{ {
#if BOO_HAS_GL
case boo::IGraphicsDataFactory::Platform::OpenGL: case boo::IGraphicsDataFactory::Platform::OpenGL:
m_bindFactory.reset(ShaderImp::Initialize(static_cast<boo::GLDataFactory::Context&>(ctx))); m_bindFactory.reset(ShaderImp::Initialize(static_cast<boo::GLDataFactory::Context&>(ctx)));
break; break;
#endif
#if _WIN32 #if _WIN32
case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::Platform::D3D12: case boo::IGraphicsDataFactory::Platform::D3D12:
@ -62,9 +64,11 @@ public:
{ {
switch (CGraphics::g_BooFactory->platform()) switch (CGraphics::g_BooFactory->platform())
{ {
#if BOO_HAS_GL
case boo::IGraphicsDataFactory::Platform::OpenGL: case boo::IGraphicsDataFactory::Platform::OpenGL:
ShaderImp::template Shutdown<boo::GLDataFactory>(); ShaderImp::template Shutdown<boo::GLDataFactory>();
break; break;
#endif
#if _WIN32 #if _WIN32
case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::Platform::D3D12: case boo::IGraphicsDataFactory::Platform::D3D12:

View File

@ -1,4 +1,6 @@
#if BOO_HAS_GL
static TMultiBlendShader<_CLS>::IDataBindingFactory* Initialize(boo::GLDataFactory::Context& ctx); static TMultiBlendShader<_CLS>::IDataBindingFactory* Initialize(boo::GLDataFactory::Context& ctx);
#endif
#if _WIN32 #if _WIN32
static TMultiBlendShader<_CLS>::IDataBindingFactory* Initialize(boo::ID3DDataFactory::Context& ctx); static TMultiBlendShader<_CLS>::IDataBindingFactory* Initialize(boo::ID3DDataFactory::Context& ctx);
#endif #endif

View File

@ -32,9 +32,11 @@ public:
{ {
switch (ctx.platform()) switch (ctx.platform())
{ {
#if BOO_HAS_GL
case boo::IGraphicsDataFactory::Platform::OpenGL: case boo::IGraphicsDataFactory::Platform::OpenGL:
m_bindFactory.reset(ShaderImp::Initialize(static_cast<boo::GLDataFactory::Context&>(ctx))); m_bindFactory.reset(ShaderImp::Initialize(static_cast<boo::GLDataFactory::Context&>(ctx)));
break; break;
#endif
#if _WIN32 #if _WIN32
case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::Platform::D3D12: case boo::IGraphicsDataFactory::Platform::D3D12:
@ -61,9 +63,11 @@ public:
{ {
switch (CGraphics::g_BooFactory->platform()) switch (CGraphics::g_BooFactory->platform())
{ {
#if BOO_HAS_GL
case boo::IGraphicsDataFactory::Platform::OpenGL: case boo::IGraphicsDataFactory::Platform::OpenGL:
ShaderImp::template Shutdown<boo::GLDataFactory>(); ShaderImp::template Shutdown<boo::GLDataFactory>();
break; break;
#endif
#if _WIN32 #if _WIN32
case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::Platform::D3D12: case boo::IGraphicsDataFactory::Platform::D3D12:

View File

@ -1,4 +1,6 @@
#if BOO_HAS_GL
static TShader<_CLS>::IDataBindingFactory* Initialize(boo::GLDataFactory::Context& ctx); static TShader<_CLS>::IDataBindingFactory* Initialize(boo::GLDataFactory::Context& ctx);
#endif
#if _WIN32 #if _WIN32
static TShader<_CLS>::IDataBindingFactory* Initialize(boo::ID3DDataFactory::Context& ctx); static TShader<_CLS>::IDataBindingFactory* Initialize(boo::ID3DDataFactory::Context& ctx);
#endif #endif

2
amuse

@ -1 +1 @@
Subproject commit 77215fc9964166decda12e65c68a1a2a0ea06757 Subproject commit d399f1d302663b85d1062f8876a9b4d0436c1815

2
hecl

@ -1 +1 @@
Subproject commit 90f0840eee5b9daf53f8368717ac930d5850e21f Subproject commit eec247cff61e8f7d561109ce321b57e84c8663e5

2
nod

@ -1 +1 @@
Subproject commit 63ae60a967c316969f41927dbf510a8d311cd03d Subproject commit 3d70a568dcb04d2d1cc114493ab38e7cff10e78d

@ -1 +1 @@
Subproject commit 72ab26a9208ca2200ca7c692a8a256ed48793a48 Subproject commit f93f63b53f552af93980cdb4552a54f3330e5fb6

View File

@ -1,3 +1,4 @@
if(NOT WINDOWS_STORE)
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17 cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
project(visigen) project(visigen)
@ -24,3 +25,4 @@ add_executable(visigen ${PLAT_SRCS}
VISIRenderer.cpp VISIRenderer.hpp VISIRenderer.cpp VISIRenderer.hpp
VISIBuilder.cpp VISIBuilder.hpp) VISIBuilder.cpp VISIBuilder.hpp)
target_link_libraries(visigen logvisor athena-core athena-libyaml zeus glew xxhash ${ZLIB_LIBRARIES} ${LZO_LIB} ${BOO_SYS_LIBS}) target_link_libraries(visigen logvisor athena-core athena-libyaml zeus glew xxhash ${ZLIB_LIBRARIES} ${LZO_LIB} ${BOO_SYS_LIBS})
endif()