What are WebGL's draw primitives?

前端 未结 2 1324
天涯浪人
天涯浪人 2021-02-14 06:00

I\'ve been doing some graphics programming using webgl to draw OBJMesh\'s, but it hasn\'t gone too well as it is not drawing it correctly. I think thats because of the drawing p

2条回答
  •  执笔经年
    2021-02-14 06:31

    From https://www.khronos.org/registry/webgl/specs/1.0/:

    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;
    

提交回复
热议问题