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

Use GL values for ARRAY_BUFFER and ELEMENT_ARRAY_BUFFER #170

Closed
pjcozzi opened this issue Nov 1, 2013 · 9 comments
Closed

Use GL values for ARRAY_BUFFER and ELEMENT_ARRAY_BUFFER #170

pjcozzi opened this issue Nov 1, 2013 · 9 comments

Comments

@pjcozzi
Copy link
Member

pjcozzi commented Nov 1, 2013

This may already been a known issue, but these should be the GL enum values, not strings:

        "bufferView_29": {
            "buffer": "duck",
            "byteLength": 76768,
            "byteOffset": 0,
            "target": "ARRAY_BUFFER"
        },
        "bufferView_30": {
            "buffer": "duck",
            "byteLength": 25272,
            "byteOffset": 76768,
            "target": "ELEMENT_ARRAY_BUFFER"
        },

From the WebGL spec:

const GLenum ARRAY_BUFFER                   = 0x8892;
const GLenum ELEMENT_ARRAY_BUFFER           = 0x8893;
@pjcozzi
Copy link
Member Author

pjcozzi commented Nov 1, 2013

Likewise, we should use GL enum values for the primitive type.

            "primitives": [
                {
                    "indices": "indices_21",
                    "material": "blinn3-fx",
                    "primitive": "TRIANGLES",

From the WebGL spec:

    const GLenum POINTS                         = 0x0000;
    const GLenum LINES                          = 0x0001;
    const GLenum LINE_LOOP                      = 0x0002;
    const GLenum LINE_STRIP                     = 0x0003;
    const GLenum TRIANGLES                      = 0x0004;
    const GLenum TRIANGLE_STRIP                 = 0x0005;
    const GLenum TRIANGLE_FAN                   = 0x0006;

@fabrobinet
Copy link
Contributor

That's done on master no ? Or at least on dev-2

@pjcozzi
Copy link
Member Author

pjcozzi commented Nov 1, 2013

It's not in master, or at least not in the example models. Sorry, I'm not brave enough to develop against dev-2.

@pjcozzi
Copy link
Member Author

pjcozzi commented Nov 1, 2013

This is fixed in master, but the example models were not updated. This is sloppy of us. We need to keep these in sync so we know what changes version to version. Diffing the examples is the very first thing I do when updating the converter.

@pjcozzi
Copy link
Member Author

pjcozzi commented Nov 1, 2013

Also, target is fixed, but not primitive.

@fabrobinet
Copy link
Contributor

Ok, let's keep it for that then

@fabrobinet
Copy link
Contributor

Yes, about updating models... obviously my bad... I'll update then as soon as I can.

@fabrobinet
Copy link
Contributor

same here, fixed on dev-2.

@fabrobinet
Copy link
Contributor

now on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants