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]
4 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]4 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
Computer viruses and coding books
timofeeve [1]
Is there a picture to go along with this? I don’t see one and an willing to help!
3 0
3 years ago
Who initially developed what is now known as the internet?
Lyrx [107]

in 1990, when computer scientist Tim Berners-Lee invented the World Wide Web.

5 0
3 years ago
The larget social networking site to date is
maks197457 [2]
FB, I would guess.

Sincerely,

Xeno
3 0
3 years ago
Which ribbon tab is not a default in Outlook 2016's main interface?
Verizon [17]

Answer:

review

Explanation:

4 0
3 years ago
Read 2 more answers
How is a worm different from a Trojan?
olga_2 [115]

Answer:

C. A worm spread through a network, whereas a trojan hides inside another program.

Explanation:

Worms spread through computer networks, a great example of a popular computer worm that struck the world is the "ILOVEYOU" / "Love Letter for You" worm. The malware infected over ten million personal computers and was spread via the user's email and sent to all addresses in the user's address book.

A trojan virus is essentially a piece of malicious software that looks legitimate from the outside but in under the seal it's highly malicious and destructive; hence how it got it's name "Trojan Horse" which is a reference to an Ancient Greek story of deception.

8 0
3 years ago
Other questions:
  • How many channels are in an ISDN PRI connection?
    12·2 answers
  • Declare k, d, and s so that they can store an integer, a real number, and a small word (under 10 characters). Use these variable
    13·1 answer
  • What advantages do fiber optic cables offer over twisted pair or other media choices?
    8·1 answer
  • Give an example of an outdated memory or storage device what do you think they are outdated
    12·1 answer
  • Please answer <br><br> Steps 1-6 <br><br> Visual basics
    7·1 answer
  • In your own words, what is pair-programming? What is the role of the driver? What is the role of the navigator? What are some be
    15·1 answer
  • Match the component to its function. resistor inductor capacitor battery transistor This component stores a temporary charge. ar
    7·2 answers
  • Please help thank you !!!
    7·2 answers
  • what are the main technologies that have contributed to the growth and commercialization of the internet .​
    5·1 answer
  • What problems might scientists encounter in using this ethod in the field that you would not have encountered in the simunlation
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!