Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

russimp: Introduce FileSystem loading #56

Merged
merged 5 commits into from
Jan 16, 2024
Merged

Commits on Nov 24, 2023

  1. russimp: Introduce FileSystem loading

    When loading resources from memory buffers, sometimes the resources in
    question link to secondary files that must also be loaded.  An example
    of this is the loading of .obj files, which store their materials in a
    secondary .mtl file.  This file can't be passed in using the
    from_buffer() loading path, resulting in the need to load the files from
    the host native filesystem using the from_file() loading path.
    
    This change implements a rust safe loading path to allowing applications
    to implement their own virtual filesystem interface with assimp. This is
    convenient for use in combination with an application specific resource
    loader.
    
    To use, callers simply implement the fs::FileSystem trait, which
    neccesitates the implementation of open() which returns their own type
    as a trait object implementing fs::FileOperations.
    
    This new fs module handles all the unsafe glue required to interface
    this safe trait-based interface with the underlying unsafe aiFileIO
    parts.
    waych committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    ce503f7 View commit details
    Browse the repository at this point in the history
  2. fs: use usize consistently

    Fixed various issues when building against russimp-sys 2.0.
    waych committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    86aa13e View commit details
    Browse the repository at this point in the history
  3. fs: more missed usize

    waych committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    c58341c View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2023

  1. Configuration menu
    Copy the full SHA
    1e90aa2 View commit details
    Browse the repository at this point in the history
  2. Use immutable reference for FileSystem

    Remove unneccesary and wrong mut usage. FileSystem is only used as an
    immutable reference, usage expects user to use internal mutability if
    they so desire it, as this is the least restrictive option vs requiring
    mutable FileSystem.
    waych committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    35f9ff5 View commit details
    Browse the repository at this point in the history