Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Static glTF mesh loading #200

Closed
wants to merge 73 commits into from
Closed

Commits on Apr 18, 2024

  1. Add tinygltf library

    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    36a90e9 View commit details
    Browse the repository at this point in the history
  2. Export tinygltf target

    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    a3b2dbd View commit details
    Browse the repository at this point in the history
  3. Do CMake right

    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    a0b7a15 View commit details
    Browse the repository at this point in the history
  4. Add GLTF mesh file loader

    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    bde174d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    92862a3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4b6ab05 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7900f0a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a9f56df View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5e2d9d9 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    30d5748 View commit details
    Browse the repository at this point in the history
  11. Update vertex test for coordinate system

    This is also the first working version of the mesh. I successfully
    loaded it in Minetest.
    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    2ae436c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8c9c1e5 View commit details
    Browse the repository at this point in the history
  13. Test invalid JSON

    Also converted all .cpp and .h line endings to CRLF in this commit.
    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    21c3c16 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    a20ac71 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    3d2d3f8 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    b4c4325 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    82c547d View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    12b760e View commit details
    Browse the repository at this point in the history
  19. Add test for blender cube

    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    837b6be View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    742307f View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    72cb09a View commit details
    Browse the repository at this point in the history
  22. Test vertex normals on cube

    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    7220104 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    cdad3a8 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    3dc24ab View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    47a195b View commit details
    Browse the repository at this point in the history
  26. Fix coordinate system change

    Old code was inverting the X axis, new code inverts the Z axis.
    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    a326f27 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    f1042bf View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    0216a02 View commit details
    Browse the repository at this point in the history
  29. Fix indices, inverted models, & multiple models failing to load

    Fix embedded textures causing a model not to load
    
    Add todo
    
    Add another todo
    
    Push current (broken) prototyping
    
    Fix missing bracket
    
    Make a single array object work
    
    Convert hard array into dynamic vector
    
    Simplify semantics
    
    Remove "new"
    
    Add blocker for vscode environment changes
    
    Disable non-dynamic prototyping
    
    Add comment
    
    Add more informative debug & disable it
    
    Add additional items to gitignore
    
    Add debug info for scalar value
    
    Output even more debug info
    
    Make textures render correctly
    
    Insert the indices properly
    
    Update .gitignore
    
    Disable y flip
    
    Make a reusable vertex buffer :)
    
    Disallow embedded textures
    
    More disable
    
    Set up implementation for contiguous model
    
    Add a note
    
    More automation & framework
    
    Final framework before stepping into function overhaul
    
    Hold track of current_index
    
    Integrate iterators
    
    More integration
    
    Rename, it's going to need 2 counters
    
    Correctly offset the count to the right
    
    Sync normals with positions
    
    Time to use a tuple
    
    Set up other counters
    
    Do return value
    
    Do input passing
    
    Make (somewhat) working contiguous model
    
    Add getter for translation data
    
    Add debug info for future utilization
    
    Update .gitignore
    
    More debug
    
    Update .gitignore
    
    Update .gitignore
    
    Remove all debug info & clean up
    
    Delete this thing
    
    Automate everything & put it into spec
    
    Spaces into tabs
    
    Remove array include as build test
    
    Fix the gitignore
    jordan4ibanez authored and JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    08d226c View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    4a8602e View commit details
    Browse the repository at this point in the history
  31. Update code with requested changes

    Fix mistake on github
    
    Comply with changes 1
    
    Comply with requested changes 2
    
    Comply with requested changed 3
    
    Comply with requested changed 4
    
    Requested changed 5
    
    Requested changed 6
    
    Requested changed 7
    
    Requested changed 8
    
    Requested changed 9
    
    Requested changed 10
    
    Requested changes 11
    
    Requested changes 12
    
    This one wasn't even requested
    
    I just turned on my vertical ruler and I'm going to go nuts
    
    Line 81 doesn't exist anymore
    
    Requested changes 13
    
    Requested changes 14
    
    Begin snow man test
    
    Write a lot of tests for snow man
    
    Add to git ignore
    
    Now unignore it
    
    Alphabetical order
    
    Pass by reference
    
    Pass by reference
    
    vertexBuffer is now handled on stack
    
    Preallocate indicesBuffer then reverse it when complete
    
    Undo vertexBuffer stack change causing mac builds to fail
    
    Use direct initialization on the vertexBuffer
    jordan4ibanez authored and JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    971a9e2 View commit details
    Browse the repository at this point in the history
  32. spaces->tabs

    jordan4ibanez authored and JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    030abc7 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    246ee9c View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    5a190a6 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    673de22 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    a3633af View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    eaebd34 View commit details
    Browse the repository at this point in the history
  38. Work around cmake<3.12 object target rules

    CMake does not allow specifying usage requirements with
    target_link_libraries() until version 3.12.
    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    c9e05c6 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    4d4d8df View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    9f2d5a1 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    7741238 View commit details
    Browse the repository at this point in the history
  42. Set C compiler to gcc-5 for minimum-cmake CI

    gcc-5 is already installed on the CI as a dependency for g++-5.
    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    5bae506 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    3bbf3f7 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    2175cf6 View commit details
    Browse the repository at this point in the history
  45. Reorganize CGLTFMeshFileLoader help functions

    I moved them all into static methods and changed the ordering in the
    source file so that createMesh() would be close to the top of the file.
    I also corrected formatting in some of the function declarations since I
    had to change them anyway.
    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    7e0d57b View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    2dbe3b8 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    79bfd8a View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    85fdf95 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    50da042 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    8c9a576 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    5f5dd7a View commit details
    Browse the repository at this point in the history
  52. Refactor getIndices()

    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    ea22b64 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    60a5f57 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    fd41ee0 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    22f6012 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    0f73c30 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    3930bd8 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    0896aae View commit details
    Browse the repository at this point in the history
  59. Refactor vertex loading

    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    53c92b0 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    16b7841 View commit details
    Browse the repository at this point in the history
  61. Borrow CReadFile for tests

    The method to load a mesh from a file was removed. This is not a good
    fix, but it will keep the tests working until a file loader can be
    properly exposed to the tests.
    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    05ede68 View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    eabc84a View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    86026f9 View commit details
    Browse the repository at this point in the history
  64. Handle byte stride on vertex buffers

    Vertex buffers (and only vertex buffers) may have a byte stride
    specified.
    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    95a4030 View commit details
    Browse the repository at this point in the history
  65. Package glTF spec docs with comments

    * git --CRUSH
    
    And try to make this line the same
    
    Now undo my gitignore nonsense
    
    Hail mary
    
    Move these functions to the top
    
    More documentation
    
    Add some serious documentation
    
    Move this to the top
    
    Readability & documentation
    
    Add some documentation
    
    Add spec documentation
    
    Make this more more complex to make it less complex
    
    Move this up & document
    
    Make this more readable for me
    
    Document and make this more readable
    
    Move this out of the way and document it
    
    Update CGLTFMeshFileLoader.cpp
    
    Documentation
    
    Document
    
    Update CGLTFMeshFileLoader.cpp
    
    Document
    
    Move entry point to bottom
    
    Part 5
    
    Part 4
    
    Part 3
    
    Part 2
    
    Allman -> OTBS (readability for me)
    
    Consolidate
    
    Remove unneeded function
    
    These files are annoying
    
    * fix #1
    
    * fix 2
    
    * indentation
    
    * Remove redundant function
    
    * Remove redundant function
    
    * add trailing new line
    
    * Stop an interesting build error with a template
    
    * Code reduction
    
    * Document bytestride
    
    * Add more detail to chain hierarchy
    
    * Dump this huge vscode thing in here for no reason
    
    * Document 3 more functions
    
    * Document copyTcoords
    
    * Dump in (incorrect) scale documentation for node
    
    * Add a readable description
    
    * Fix incorrect getScale
    
    * Add update based on context of function
    
    * Add documentation, fix another one
    
    * Document another
    
    * Document another
    
    * And document another
    
    * Document this nice function
    
    * Bolt in some future use documentation
    
    * Add highlighting for IDE
    
    * Just shovel on more docs to this
    
    * 2 more comments
    
    * I think that's all of them
    
    * Add some wild west debuggin
    
    * And then update this comment
    
    * Bolt on isAccessorNormalized()
    
    * Bolt in an absolute hack job to test
    
    * Now clean this mess up and give josiah ref material
    
    * Fix Josiah's request for scale
    
    * Fix josiah request
    
    * Fix josiah request .vscode
    
    Fix indentation
    
    Fix indentation
    
    Fix indentation
    
    * Unfix getScale()
    
    again
    jordan4ibanez authored and JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    f8f1024 View commit details
    Browse the repository at this point in the history
  66. Fix memory leak caused by missing drop

    appgurueu authored and JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    e2b05f0 View commit details
    Browse the repository at this point in the history
  67. Axe the minimum-cmake CI build

    This is useful, but has no business being in this PR. Off with its head.
    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    f33b8a6 View commit details
    Browse the repository at this point in the history
  68. Fix getScale()

    * Fix getScale()
    
    * Create blender_cube_scaled.gltf
    
    * Add scaling unit test
    
    * Remove comment
    
    * Undo github's silent reversion of 1,1,1
    jordan4ibanez authored and JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    777ec9d View commit details
    Browse the repository at this point in the history
  69. Move from tinygltf to tiniergltf (#13)

    * Remove tinygltf
    
    * Integrate tiniergltf
    
    * Update build.yml to include jsoncpp
    
    * Namespace target
    
    * Undo noexcept removal, readd move constructor
    
    * Remove debug throw
    
    * Remove now obsolete build code
    
    * Bump CMake minimum version to 3.12
    
    * Fix oops
    
    * Remove unnecessary install/export
    
    * Remove tinygltf from Config.cmake.in
    
    * Take inspiration from Minetest's FindJson.cmake
    
    * Move tiniergltf to separate repo
    
    * CI: Install git
    
    * Bump tiniergltf version (obtain jsoncpp via FetchContent)
    
    * Remove jsoncpp from build dependency list
    appgurueu authored and JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    0faf132 View commit details
    Browse the repository at this point in the history
  70. Fix gltf static mesh loading issues (#14)

    * Support u8 / u32 indices
    
    * Skip primitives without vertices
    
    * Add support for non-indexed geometry & skipping primitives
    
    * Fix possible memory leak on error
    
    * Use SSkinnedMesh
    
    * Check indices
    
    * Properly mirror node hierarchy
    
    * Update .gitignore
    
    * Reorder includes
    
    * Add some throws for logic errors
    
    * Fix non-indexed geometry winding order, add unit test
    
    * Address code review comments
    
    * Add matrix transform unit test
    appgurueu authored and JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    036b40a View commit details
    Browse the repository at this point in the history
  71. Move files

    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    718c865 View commit details
    Browse the repository at this point in the history
  72. Move libs

    JosiahWI committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    df4dd7b View commit details
    Browse the repository at this point in the history
  73. Configuration menu
    Copy the full SHA
    c263a28 View commit details
    Browse the repository at this point in the history