Computer Grafik

Basic Setup

Part 1
Setup a basic WebGL application

Oops ... your browser doesn't support the HTML5 canvas element

Setup a basic WebGL application.

  • Create a HTML document with a 500x500 canvas element and write a script to create a WebGL context. [Angel 2.8]
  • Setup a viewport and clear the canvas with the color cornflower blue (0.3921, 0.5843, 0.9294, 1.0). [Angel 2.5.1]
  • If not already done, move the script to a separate JavaScript file and include it in the HTML document.
  • Setup the WebGL context using Angel’s “setupWebGL”. You can use the window.onload event to initialize and setup the application. [Angel 2.8]