1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
klemol [59]
3 years ago
7

g Suppose the vertex data is stored in an array named verts and each vertex uses a list to store the coordinates. Write the code

that will allocate a buffer in the GPU and store the data into that buffer. Use gl as the WebGL graphics object.
Computers and Technology
1 answer:
kodGreya [7K]3 years ago
3 0

Answer:

function createAndFillBufferObject(gl, data) {

 var buffer_id;

 // Create a buffer object

 buffer_id = gl.createBuffer();

 if (!buffer_id) {

   out.displayError('Failed to create the buffer object for ' + model_name);

   return null;

 }

 // Make the buffer object the active buffer.

 gl.bindBuffer(gl.ARRAY_BUFFER, buffer_id);

 // Upload the data for this buffer object to the GPU.

 gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);

 return buffer_id;

}

You might be interested in
How do you enter the command prompt on Chromebook
Step2247 [10]

1) Go through the standard Chrome OS login screen (you'll need to setup a network, etc) and get to the web browser. It's OK if you login as guest.

2) Press [ Ctrl ] [ Alt ] [ T ] to get the crosh shell.

3) Use the shell command to get the shell prompt.

3 0
3 years ago
You can access various sites on WWW by using hyperlinks or by?
wlad13 [49]
You can access various sites on WWW by using hyperlinks or by?

Answer is: A following directions on-screen
5 0
3 years ago
Read 2 more answers
You may have come across websites that not only ask you for a username and password, but then ask you to answer pre-selected per
raketka [301]

Answer:

The questions are used to secure and identify you furthermore. Answering personal questions that only you can answer will deter someone from hacking into your account that easily.

Explanation:

5 0
3 years ago
What statement is used to close a loop started with a for statement?
liraira [26]
If I get what you are saying then you could use a work like end. :)
5 0
3 years ago
Using the POP standard for client to server e-mail communication, the e-mail messages remain on the server computer. True False
Gelneren [198K]

Answer:

False

Explanation:

8 0
3 years ago
Other questions:
  • 2. Identify the diagram and define it.<br>13. What are pollen grains ?<br>4. What is an embryo?​
    12·1 answer
  • A collection of related instructions organized for a common purpose is referred to as
    6·2 answers
  • Routers: operate at the application layer operate only at the physical layer cannot connect two or more networks that use the sa
    5·1 answer
  • HELP ASAP
    9·1 answer
  • How many much memory is in one megabyte ?
    9·1 answer
  • Which of the following is a valid HTML reference to a CSS file?
    13·1 answer
  • Which command would you use to swap the words hither and yon on any line with any number of words between them? (You need not wo
    5·1 answer
  • How would you reduce or minimize the size of a "file"?
    5·1 answer
  • According to the video, what is used to create computer programs?
    12·2 answers
  • Which window would show you bindings for local area connection 2?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!