Code Monkey home page Code Monkey logo

Comments (2)

LxLasso avatar LxLasso commented on May 28, 2024

Looks solid to me! Here are a few thoughts;

How will the extension setup callback know what it is setting up?

  • One callback per object type? VENDOR_ext_setup_asset(..), VENDOR_ext_setup_node(..), etc
  • An object type enum? VENDOR_ext_setup_asset(cgltf_object_type object_type, ..)
  • A string? VENDOR_ext_setup_asset(char* object, ..)

Is it enough to know the object type during setup or is the hierarchy / "path" also required in some situations?

Write! When setting up the callback functions in cgltf_options, I would much like to have a fourth one for writing - something like VENDOR_ext_write(cgltf_write_context* context, cgltf_extension* extension).

Extension "user data". Is there a case for extension setup or write implementations to need user data? Would probably suggest leaving it for later until a need pops up.

from cgltf.

pixeljetstream avatar pixeljetstream commented on May 28, 2024

Maybe instead of map just an extension list per object-type, similar to how Vulkan has pNext and sType. We also have a bunch of unofficial extensions here, and I agree a separate file to manage those could be nice. However several json utilities for loader/saver would need to be exposed I think. There is also pointer fixup and validation etc.
Allocation would go through the exisitng options api

That said so far just hacking cgltf itself was simple enough ;) and one gets the easye to use structs in return...

from cgltf.

Related Issues (20)

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.