Comments (2)
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.
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)
- cgltf_image::buffer_view::data is null HOT 2
- glb binary texture data HOT 4
- cgltf_write accessor is missing stride property HOT 1
- cgltf_write to buffer ignores options -> can't create an in-memory GLB
- write buffer_view should write TARGET
- The reference information regarding the use of cgltf_load_buffer_base64 is unclear
- Extras for cgltf_light are ignored while writing
- 2 GB+ json parser support HOT 5
- Loading this file causes a crash. HOT 4
- Suggestion: store indices instead of pointers in the data structures HOT 4
- Add support for MSFT_texture_dds extension HOT 1
- Potential Undefined Behaviour in "cgltf_component_read_index"
- How to enable draco support? HOT 3
- fopen or strcpy this function or variable is unsafe. HOT 1
- Library will not compile if using GCC in Windows.
- Node parent sanity check prevents loading files created with UniGLTF-1.27 HOT 5
- different joints for same primitive
- Stack allocate cgltf_data structure? HOT 1
- Possible to have individual flags for metallic and roughness? HOT 4
- Invalid gltf file with EXT_mesh_gpu_instancing HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cgltf.