Question: 1. Basics of WebGL Program Structure (28 marks) [Refer to the WebGL program given in the Appendix and the following diagram to answer the following

1. Basics of WebGL Program Structure (28 marks) [Refer to the WebGL program given in the Appendix and the following diagram to answer the following questions.) URE We HIM a) O mark) The files "cube html" and "cubejs are a sample WebGL application program. Where are these files stored? b) (2 marks) Which part) of code will be running in CPU? Which parts of code will be running in GPU? 0 (2. marks) What content does the body section lines 34 - 44) of the hit file create? d) (1 mark) What does the code segment from lines 2 - 21 specify? el markWhat does the code segment from lines 22 - 29 specily? . a) (1 mark) The files 'cube.html" and "cube js" are a sample WebGL application program. Where are these files stored? b) (2 marks) Which part(s) of code will be running in CPU? Which parts of code will be running in GPU? C) 2 marks) What content does the section (ines 34 - 44) of the html file create? d) (1 mark) What does the code segment from lines 2 - 21 specity? e) (1 mark) What does the code segment from lines 22 - 29 specity? mark) Which function in Java scripts is executed first after the html file is loaded into a web browser? 9) marks) Describe how the two shader programs are loaded into GPU? hy (1 mark) Which function(s) are responsible for creation of the model data of the cube? 1) a marks) What are the lengths of the model data, i.e. points) and colorst 1 after they are created? D Bmarks) Write the numerical values in the first three locations of the points[] array B marks) How is the vertex data (e. the points array) transmitted from CPU to GPU? 1) 3 marks) if the "Rotate y button is clicked from the web browser, which variable's value will be changed? What is the new value of this variable? m) marks) How will the change made in the step affect shader program running on GPU? W (mark) What does the line 126 do? o mark) If you would want to change the width and the height of the display to 1024 and 1024 respectively, modify the code in the necessary line) P (1 mark) Explain the computation in lines 12 and 13 1. Basics of WebGL Program Structure (28 marks) [Refer to the WebGL program given in the Appendix and the following diagram to answer the following questions.) URE We HIM a) O mark) The files "cube html" and "cubejs are a sample WebGL application program. Where are these files stored? b) (2 marks) Which part) of code will be running in CPU? Which parts of code will be running in GPU? 0 (2. marks) What content does the body section lines 34 - 44) of the hit file create? d) (1 mark) What does the code segment from lines 2 - 21 specify? el markWhat does the code segment from lines 22 - 29 specily? . a) (1 mark) The files 'cube.html" and "cube js" are a sample WebGL application program. Where are these files stored? b) (2 marks) Which part(s) of code will be running in CPU? Which parts of code will be running in GPU? C) 2 marks) What content does the section (ines 34 - 44) of the html file create? d) (1 mark) What does the code segment from lines 2 - 21 specity? e) (1 mark) What does the code segment from lines 22 - 29 specity? mark) Which function in Java scripts is executed first after the html file is loaded into a web browser? 9) marks) Describe how the two shader programs are loaded into GPU? hy (1 mark) Which function(s) are responsible for creation of the model data of the cube? 1) a marks) What are the lengths of the model data, i.e. points) and colorst 1 after they are created? D Bmarks) Write the numerical values in the first three locations of the points[] array B marks) How is the vertex data (e. the points array) transmitted from CPU to GPU? 1) 3 marks) if the "Rotate y button is clicked from the web browser, which variable's value will be changed? What is the new value of this variable? m) marks) How will the change made in the step affect shader program running on GPU? W (mark) What does the line 126 do? o mark) If you would want to change the width and the height of the display to 1024 and 1024 respectively, modify the code in the necessary line) P (1 mark) Explain the computation in lines 12 and 13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
