Git Product home page Git Product logo

infectedphysx's Introduction

Infected PhysX

MIT Licensed Sponsor

This repo contains C# bindings for NVIDIA PhysX as well as a Biohazrd-powered generator for generating them.

This project is not ready to be used, if you're looking for a PhysX binding for C# I'd suggest watching releases on this repository and consider sponsoring development of this library.

This repository primarily exists to serve as an example what using Biohazrd looks like today with a C++ library that has a relatively complex API. For the sake of demonstration, the output of the generator for Windows x64 is committed under InfectedPhysX/#Generated.

License

This project is licensed under the MIT License. See the license file for details.

Additionally, this project has some third-party dependencies. See the third-party notice listing for details.

Generating the bindings

  1. Ensure Git submodules are up-to-date with git submodule update --init --recursive
  2. Build and run InfectedPhysX.Generator

Note: You may see many errors and warnings during generation. This is because Biohazrd doesn't support everything in PhysX yet. These errors only indicate the corresponding APIs were skipped, so the output should still be fine as long as you don't need those APIs.

Building the sample

Building/running the sample is currently only supported on Windows x64 with Visual Studio 2019.

Prerequisites

Tool Recommended Version
Visual Studio 2019 16.9.4
.NET Core SDK 5.0
PhysX Visual Debugger Latest

Visual Studio requires the "Desktop development with C++" and ".NET desktop development" workloads to be installed.

Build Steps

This process will be streamlined eventually. For now we're avoiding deviating too far from how PhysX is normally built.

  1. Ensure Git submodules are up-to-date with git submodule update --init --recursive
  2. Run external/PhysX/physx/generate_projects.bat InfectedPhysX_win64
  3. Open external/PhysX/physx/compiler/InfectedPhysX_win64/PhysXSDK.sln in Visual Studio
  4. Build the INSTALL project in the checked configuration for the x64 platform
  5. Start the PhysX Visual Debugger (Optional, but you won't see the output otherwise.)
  6. Open InfectedImGui.sln and build/run InfectedImGui.Sample

If you make any changes to the PhysX source code or change the branch it uses, you must re-generate the bindings using the instructions above.

Additionally you may need to rebuild PhysX if you modify the binding generator. This is because there's a small native component to expose inline methods to C# that would not otherwise get exported by the C++ compiler.

infectedphysx's People

Contributors

pathogendavid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.