Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

add gl.LINES mode primitives in samples #106

Closed
andreasplesch opened this issue Aug 1, 2017 · 1 comment
Closed

add gl.LINES mode primitives in samples #106

andreasplesch opened this issue Aug 1, 2017 · 1 comment

Comments

@andreasplesch
Copy link

andreasplesch commented Aug 1, 2017

as well as other primitive modes (for gltf 1.0 and gltf 2.0). Currently, all primitives in all sample models use gl.TRIANGLES mode (4). Here is a list of the other modes:

#define GL_POINTS                         0x0000
#define GL_LINES                          0x0001
#define GL_LINE_LOOP                      0x0002
#define GL_LINE_STRIP                     0x0003
//#define GL_TRIANGLES                      0x0004
#define GL_TRIANGLE_STRIP                 0x0005
#define GL_TRIANGLE_FAN                   0x0006

I found one gltf 2.0 example model which uses gl.LINES (1):

https://github.com/mrdoob/three.js/tree/dev/examples/models/gltf/OutlinedBox

donated by @twittmann.

gl.LINES is useful for technical drawings, engineering applications.

@javagl
Copy link
Contributor

javagl commented Aug 1, 2017

There once has been a glTF 1.0 test model using GL_LINES in three.js - sorry, I have to dig out and look up the best link, but this is from an earlier version that was part of a PR: https://github.com/bdysvik/three.js/tree/7eef51a27406bdfb24c29b4b1ff5f3303711ad59/examples/models/gltf/snowflake

Maybe this example can be used as a basis for a glTF 2.0 example as well.

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

No branches or pull requests

3 participants