-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
direct GL APIs values in GLTF files. #96
Comments
I like that a lot, an array of values. See the other thread about array vs objects for state parameters. glTF is a target format, that can be generated (and cached) per target/application needs - not a cross-platform interchange format. |
thanks for the quick answer Remi. Let's stick to the purpose of the bug agree on having straight value from GL headers. The array aspect is discussed in its own issue ;) |
@fabrobinet and I have already discussed a bit, but given that we care about ease of client implementation over readability, I think using the enum values directly is better, leads to a smaller file, and ensures a fast implementation, e.g., if we stored strings, a client could still just do |
Are we really saying that one glTF file can't be read across different gl Is string parsing really that hard? I am not comfortable with this design decision. Can we table resolving this Tony On Fri, Jun 7, 2013 at 3:14 AM, Patrick Cozzi [email protected]:
Tony Parisi [email protected] Read my book! WebGL, Up and Running |
@tparisi You can verify that headers values are the same between http://www.khronos.org/registry/gles/api/2.0/gl2.h and http://www.khronos.org/registry/webgl/specs/latest/ and this is not accident, it is by design. Then, I faced the issue of having to handle possibly a lot of strings for texture format/internal format, the kind of thing I would just like to pass through... Just for states you can have a look here, and see GLContextDidChange function where I build a table to handle all the strings. I don't feel like adding more and maintaining this for all strings... (*) but with #97 , you may not depend on shaders and states, and you typically won't have to handle these values if you use a destination engine like Three.js. |
@tparisi does this seem more reasonable to you with the comment just above ? |
Yes |
Ok, so it's a green light. I will manage to implement this before Siggraph so that we can get feedback sooner than later about this choice. |
note: here this will apply for values to be written in states and textures (and written in gl calls). read only values like "type" will remain string. |
I want to make a double-check with you guys @pjcozzi @tparisi @RemiArnaud . What about the comment I put above ? if we implement this should we do it for every GL value or just in selected places ? |
sure. |
We agreed to move on first on the implementation and see how it feels |
I am implementing it in a branch (dev-1) - will provide feedback soon. |
done in dev-1 branch and tested in the viewer.
|
added a branch label, to keep track of the bugs fixed in branches, only when integrated in master they can be close... |
@tparisi @pjcozzi @RemiArnaud I'll merge into master when we get other converter bugs fixed. But it should be ready for specification work now. |
Looks great. |
removing converter label - pushed on master. |
@fabrobinet schema is updated, let's close this. |
If we go for a states specification that is per profile, one side effect could be to put directly the values of the states. (numbers, not string)
That would make less readable GLTF files, but more straight forward to handle in APIs...BUT it would make each platform potentially incompatible…
I have been thinking of this, as I am looking at textures, there are so many values for format/internalFormat/type... that handling all these strings will be painful :(
@pjcozzi @RemiArnaud @tparisi
Thoughts ?
The text was updated successfully, but these errors were encountered: