WEBGL is a state machine

Frame two commands

  • DrawCall
  • Clear

All states in the DrawCall

  • Blend State (9 states)
    • BLEND: false
    • BLEND_COLOR: 0, 0, 0, 0
    • BLEND_DST_ALPHA: ZERO
    • BLEND_DST_RGB: ZERO
    • BLEND_EQUATION_ALPHA: FUNC_ADD
    • BLEND_EQUATION_RGB: FUNC_ADD
    • BLEND_SRC_ALPHA: ONE
    • BLEND_SRC_RGB: ONE
  • Color State
    • COLOR_WRITEMASK: true, true, true, true
  • Coverage State
    • SAMPLE_COVERAGE_VALUE: 1
    • SAMPLE_COVERAGE_INVERT: false
    • SAMPLE_COVERAGE: false
    • SAMPLE_ALPHA_TO_COVERAGE: false
  • Cull State
    • CULL_FACE: true
    • CULL_FACE_MODE: BACK
  • Depth State
    • DEPTH_TEST: true
    • DEPTH_FUNC: LEQUAL
    • DEPTH_RANGE: 0, 1
    • DEPTH_WRITEMASK: true
  • Draw State
    • DITHER: true
    • VIEWPORT: 0, 0, 1300, 789
    • FRONT_FACE: CCW
    • FRAGMENT_SHADER_DERIVATIVE_HINT_OES: Extension OES_standard_derivatives is unavailble.
    • RASTERIZER_DISCARD: false
    • FRAGMENT_SHADER_DERIVATIVE_HINT: 4352
  • Polygon Offset State
    • POLYGON_OFFSET_FILL: false
    • POLYGON_OFFSET_FACTOR: 0
    • POLYGON_OFFSET_UNITS: 0
  • Scissor State
    • SCISSOR_TEST: false
    • SCISSOR_BOX: 0, 0, 300, 150
  • Stencil State
    • STENCIL_TEST: false
    • STENCIL_BACK_FAIL: KEEP
    • STENCIL_BACK_FUNC: ALWAYS
    • STENCIL_BACK_PASS_DEPTH_FAIL: KEEP
    • STENCIL_BACK_PASS_DEPTH_PASS: KEEP
    • STENCIL_BACK_REF: 0
    • STENCIL_BACK_VALUE_MASK: 01111111111111111111111111111111
    • STENCIL_BACK_WRITEMASK: 01111111111111111111111111111111
    • STENCIL_FAIL: KEEP
    • STENCIL_FUNC: ALWAYS
    • STENCIL_PASS_DEPTH_FAIL: KEEP
    • STENCIL_PASS_DEPTH_PASS: KEEP
    • STENCIL_REF: 0
    • STENCIL_VALUE_MASK: 01111111111111111111111111111111
    • STENCIL_WRITEMASK: 01111111111111111111111111111111

Clear all states inside

  • Clear State
    • COLOR_CLEAR_VALUE: 0, 0, 0, 0
    • DEPTH_CLEAR_VALUE: 1
    • STENCIL_CLEAR_VALUE: 0