10 Answers
New AnswerBy applying I meant gl_FragColor = v_Color; Anyway I should give you few tips for your next WebGL codes: 1) create shaders only once in beginning of your code + save all attrib/uniform locations in variables 2) store buffers for each object, recreate buffer data only if they change https://code.sololearn.com/Wnlp95QD05gI/?ref=app
you can also create a texture then stickit onto your shapes. you can even draw on a separate regular 2d context canvas and use that for a texture. ... so many possibilities.
😑😵😵 Are you kidding me? Who can make triangle out of 6 vertices... I was trying to find the issue for 20 minutes. You need to assign same number of colors in your case 6 colors instead of 3
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message