 #
 #           -- VERT
 #         /         \
-#  CONTEXT -- FRAG -- LINK -- DATA -- RENDER
-#         \                         /
-#           -- GEOM ---------------
-#
-#
-# CONTEXT:  create WebGL context
+#  CONTEXT -- FRAG -- LINK -- RENDER
+#         \                 /
+#           -- GEOM --------
+#
+#
+# CONTEXT:  set up WebGL context
 # VERT:     compile vertex shader
 # FRAG:     compile fragment shader
 # LINK:     link program, look up and cache attribute and uniform locations
 # GEOM:     generate vertex buffer with geometry
-# DATA:     set values for uniforms and update viewport dimensions if required
-# RENDER:   render scene
+# RENDER:   set values for uniforms, update viewport dimensions, render scene
 #
 # When the object is first created, each step is performed in dependency order from context creation
 # to rendering. Various API methods will invalidate a specific step, requiring that it and all dependent steps


    @debugContext = WebGLDebugUtils.makeDebugContext @nativeContext, null, throwErrorOnUndefinedArgument, null

    @gl = gl = if @_debugMode then @debugContext else @nativeContext

    # create all the object
    @_vertexBuffer = gl.createBuffer()


    @_frameScheduled = false

    if @_contextRequiresSetup
      @_setupContext()
      @_contextRequiresSetup = false

    if @_geometryIsDirty
      @_updateGeometry()
      @_geometryIsDirty = false

    requiresLink = @_vertexShaderIsDirty or @_fragmentShaderIsDirty

    if @_vertexShaderIsDirty
      @_compileShader(@_vertexShader, @vertexShaderSource)
      @_vertexShaderIsDirty = false

    if @_fragmentShaderIsDirty
      @_compileShader(@_fragmentShader, @fragmentShaderSource)
      @_fragmentShaderIsDirty = false

    if requiresLink
      @_linkProgram()

    @_render()

