Skip to content

Commit

Permalink
WebGPU: Fixed build settings for pthreads and added selection of api
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailGorobets committed Jul 30, 2024
1 parent b4b4850 commit 07f3dcf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions NativeApp/src/Emscripten/EmscriptenMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ int main(int argc, char* argv[])
{
std::unique_ptr<Diligent::NativeAppBase> pApplication{Diligent::CreateApplication()};

if (argc > 0 && argv != nullptr)
{
auto CmdLineStatus = pApplication->ProcessCommandLine(argc, argv);
if (CmdLineStatus == Diligent::AppBase::CommandLineStatus::Help)
return 0;
else if (CmdLineStatus == Diligent::AppBase::CommandLineStatus::Error)
return 1;
}

NativeAppCallbackData AppUserData{pApplication.get(), "#canvas"};

int32_t CanvasWidth = 0;
Expand Down
4 changes: 4 additions & 0 deletions ThirdParty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ if (NOT TARGET PNG::PNG)
install(FILES libpng/LICENSE DESTINATION ${LICENSE_INSTALL_PATH} RENAME lpng-license.txt)
add_library(PNG::PNG ALIAS png_static)
list(APPEND THIRD_PARTY_TARGETS png_static)

if (PLATFORM_EMSCRIPTEN)
set_targets_emscripten_properties(png_static)
endif()
endif()


Expand Down

0 comments on commit 07f3dcf

Please sign in to comment.