Complete the assignment
This commit is contained in:
parent
a360ca4816
commit
f6d9bbadb9
@ -6,7 +6,7 @@
|
||||
</head>
|
||||
|
||||
<body onload="main()">
|
||||
<canvas id="webgl" width="400" height="400">
|
||||
<canvas id="webgl" width="600" height="400">
|
||||
Please use a browser that supports "canvas"
|
||||
</canvas>
|
||||
|
@ -7,14 +7,14 @@ const vertex_shader = `
|
||||
void main()
|
||||
{
|
||||
gl_Position = a_Position;
|
||||
gl_PointSize = 10.0;
|
||||
gl_PointSize = 25.0;
|
||||
} `;
|
||||
|
||||
|
||||
const fragment_shader = `
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
|
||||
} `;
|
||||
|
||||
function main()
|
||||
@ -50,7 +50,7 @@ function main()
|
||||
canvas.onmousedown = function(ev){ click(ev, gl, canvas, a_Position); };
|
||||
|
||||
// Specify the color for clearing <canvas>
|
||||
gl.clearColor(0.0, 1.0, 0.0, 1.0);
|
||||
gl.clearColor(0.3, 0.3, 0.3, 1.0);
|
||||
|
||||
// Clear <canvas>
|
||||
gl.clear(gl.COLOR_BUFFER_BIT);
|
Loading…
Reference in New Issue
Block a user