Skip to main content
Minor typo
Source Link

I'mI am currently looking into glTF to use as a transfer format for my WebGL project. I already have the geometries I wish to render on my WebGL client available as preprocessed vertex and index buffers (and color buffers, but let's ignore them for now).

For example:

[       // vertex buffer
  0,0,0,
  0,1,0,
  1,0,0,
  1,1,0,
]

And to draw simple LINES:

[       // index buffer
  0,2,
  2,4,
  4,0,
  0,1,
  1,4,
]

I wonder how to create glTF files containing these buffers? Is this possible?

I want to avoid using COLLADA and COLLADA2GLTF as this would only add an additional step and might just bloat the resulting glTF files.

I'm am currently looking into glTF to use as a transfer format for my WebGL project. I already have the geometries I wish to render on my WebGL client available as preprocessed vertex and index buffers (and color buffers, but let's ignore them for now).

For example:

[       // vertex buffer
  0,0,0,
  0,1,0,
  1,0,0,
  1,1,0,
]

And to draw simple LINES:

[       // index buffer
  0,2,
  2,4,
  4,0,
  0,1,
  1,4,
]

I wonder how to create glTF files containing these buffers? Is this possible?

I want to avoid using COLLADA and COLLADA2GLTF as this would only add an additional step and might just bloat the resulting glTF files.

I am currently looking into glTF to use as a transfer format for my WebGL project. I already have the geometries I wish to render on my WebGL client available as preprocessed vertex and index buffers (and color buffers, but let's ignore them for now).

For example:

[       // vertex buffer
  0,0,0,
  0,1,0,
  1,0,0,
  1,1,0,
]

And to draw simple LINES:

[       // index buffer
  0,2,
  2,4,
  4,0,
  0,1,
  1,4,
]

I wonder how to create glTF files containing these buffers? Is this possible?

I want to avoid using COLLADA and COLLADA2GLTF as this would only add an additional step and might just bloat the resulting glTF files.

edited tags
Link
q9f
  • 703
  • 2
  • 8
  • 22
Source Link
q9f
  • 703
  • 2
  • 8
  • 22

Is it possible to create minimal glTF files with vertex and index buffers?

I'm am currently looking into glTF to use as a transfer format for my WebGL project. I already have the geometries I wish to render on my WebGL client available as preprocessed vertex and index buffers (and color buffers, but let's ignore them for now).

For example:

[       // vertex buffer
  0,0,0,
  0,1,0,
  1,0,0,
  1,1,0,
]

And to draw simple LINES:

[       // index buffer
  0,2,
  2,4,
  4,0,
  0,1,
  1,4,
]

I wonder how to create glTF files containing these buffers? Is this possible?

I want to avoid using COLLADA and COLLADA2GLTF as this would only add an additional step and might just bloat the resulting glTF files.