WebGL Blue Triangle

Your browser doesn't support canvas.

Render a triangle with WebGL. The right triangle's composed of three vertices. Color's declared as a vec4 representing red, green, blue and alpha channels. Upload a uniform, representing color, to the fragment shader.

Basic WebGL Examples

  1. Display a triangle.
  2. Render a square plane.
  3. Interactively change colors on a square plane.
  4. Rotate a square.
  5. Animate two intersecting square planes.
  6. Animate, rotate, and dynamically change colors, on multiple square planes.
Learn 3D Programming Learn 3D Programming
Copyright © 2015 Seven Thunder Software. All Rights Reserved.