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
In which file format is image data compiled into a binary file? TIFF SVG CGM BMP
Licemer1 [7]

BMP (Bitmap). I may be wrong. I'm sorry.

6 0
3 years ago
Four workers take an extra half-hour for lunch, at a cost of $14/ hour
Usimov [2.4K]

Answer:

whats the rest ?

Explanation:

whats the rest ?

8 0
3 years ago
People who enjoy working with their hands might enjoy a career as an
Kaylis [27]
People that enjoy working with their hands might enjoy being a construction worker but their are a lot of other jobs that involve using their hands but being a construction worker takes a lot of effort and a lot of hard work to complete.
6 0
3 years ago
Read 2 more answers
Why are digital signals an accurate and reliable way to record and send information?
Oduvanchick [21]

Answer:

A wave that has been digitized can be played back as a wave over and over, and it will be the same every time. For that reason, digital signals are a very reliable way to record information—as long as the numbers in the digital signal don’t change, the information can be reproduced exactly over and over again.

Explanation:

6 0
2 years ago
Audience centered public speakers are inherently sensitive to the
DanielleElmas [232]
Diversity of their audiences
7 0
2 years ago
Read 2 more answers
Other questions:
  • Respecting yourself and others, educating yourself and connecting with others, and protecting yourself and others are all aspect
    9·2 answers
  • Rikki has had several problems at work recently. Her printer isn't printing correctly, copies from the copy machine come out wit
    8·2 answers
  • Why is there more content on youtube in 4k then there is on cable, satellite, and digital tv combined?
    6·2 answers
  • Write the execution steps if the input is a lion.
    11·1 answer
  • Universal Containers is tracking the interviewer's ratings of candidate in Salesforce. They would like to easily link the Candid
    9·1 answer
  • What is a Better Computer?<br> A. Alien<br> B. Microsoft<br> C. Windows<br> D. Apple
    11·2 answers
  • Which of the following is an easy steps to take to avoid ESSD well working on your computer?
    5·1 answer
  • What do computer programs generally try to solve and how? A) Computer programs generally try to solve a well-defined problem usi
    14·1 answer
  • Date
    6·1 answer
  • Which best describes what databases do?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!