What are WebGL's draw primitives?

前端 未结 2 1325
天涯浪人
天涯浪人 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条回答
  •  闹比i
    闹比i (楼主)
    2021-02-14 06:28

    Yes, WebGL draws the same primitives as OpenGL ES (same also as OpenGL). Have you tried drawing some trivial meshes so you can narrow down what the problem could be? Are you setting culling, drawing the right primitive, etc.?

    I've done a few WebGL demos where I draw complex meshes, and I always use GL_TRIANGLES (TRIANGLES). If I try the same meshes with other primitives, it breaks the mesh, so it depends how the mesh was created.

    Here are my demos http://rodrigo-silveira.com/webgl-3d-demos/

提交回复
热议问题