icosa-foundation / open-brush

Open Brush is the open source, community led evolution of Tilt Brush! Forked from https://github.com/googlevr/tilt-brush
https://openbrush.app
Apache License 2.0
853 stars 176 forks source link

Simplify VrSdk #132

Open billyquith opened 3 years ago

billyquith commented 3 years ago

Do some of what is suggested in the comment. Simplify VrSdk to make further refactoring and development easier.

    //
    // The VrSdk is an abstraction over the actual VR hardware and SDK. It is responsible for:
    //
    //   * Initializating the VR system, cameras, controllers and associated state.
    //   * Providing hardware- and SDK-specific controls via a non-specific interface.
    //   * Providing abstract access to events sent from the SDK.
    //   * Exposing an interface to query Hardware and SDK capabilities.
    //
    // TODO: In its current form, the VrSdk is monolithic, though it should ultimately be
    // broken out into hardware- and SDK-specific modules, which can be loaded and unloaded at startup
    // or build time.
    //
    //   - Distribution
    //       - Build
    //           - SDK
    //           * Platform - Win32/64, Android, iOS.
    //           * Options
    //                * Experimental
    //           * Config
    //               * Develop
    //               * Profile
    //               * Release
    //       - Device
    //           - Overlay
    //           - Controller

The structure above is more modular. If there is a "distribution" above the SDK then the architecture can be specialised for a target store/platform, e.g. Store features/analytics/content. Additionally, multiple SDKs could be used for target builds whilst the OpenXR complications sort themselves out.

mikeskydev commented 2 years ago

This has been partially done through the work of moving to UnityXR, but a few bits remain w.r.t monoscopic mode, and there's still controller specific choices made that should ideally be moved to some sort of abstract class. let's bump this issue to after xr_v2 is merged when we've got a new baseline.