I have got myself a nice shape using webGL, but when i use the line strip option, I’m also get triangles from the back, how can I just not draw back face? the shape is really hard to understand when so many triangles being drawn 🙁
I’m using
gl.drawArrays(gl.TRIANGLES, 0, myBuffer.items);
gl.drawArrays(gl.LINE_STRIP, 0, myBuffer.items);
and it looks horrible, so i just use
gl.drawArrays(gl.LINE_STRIP, 0, triangleVertexPositionBuffer.numItems);
But it still looks very hard to understand,
any help will be great 🙂
Canvas
It’s ok, i got around it, what i did was create a small piece of code to just generate a weird colour for each triangle like so
So now all the faces are filled, but I can actually see my shape :), sorry for the bother, but cheers for the help