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
You are planning to depart on a flight from area 2 to area 4 in 12 hours. What weather is forecast to occur along your route?
Andre45 [30]
It depends on where you live!
5 0
2 years ago
9.2 lesson practice ​
makvit [3.9K]

Answer:

6 columns/items

Explanation:

<em>grid</em> starts off as an empty list ( [ ] ), so right now it has 0 items/columns.

After that, 3 new items ("frog", "cat", "hedgehog") have been appended to <em>grid</em>, it now has 3 items

Finally another 3 items are appended to <em>grid ("fish", "emu", "rooster"</em>), finally <em>grid</em> ends up with 6 items in total.

5 0
2 years ago
Which two climates have moderate rainfall and experience warm summers and cold winters due to their position relative to mountai
77julia77 [94]
Most probably grassland and steppes
6 0
3 years ago
What are specific and relevant terms that will help you locate information using an internet search engine?
Liono4ka [1.6K]
I would say A:keywords

Hope this helps

I’m sorry if this is wrong

Have a great day/night
3 0
3 years ago
When saving a memo you created in Word, which one of the following extensions is automatically assigned to the document?
VMariaS [17]
What are the options and if it's meaning like when you save something it has .pdf .jpg or .doc after the title then it would be ".doc"
8 0
3 years ago
Other questions:
  • Think about the five steps to writing an algorithm. Why is each step necessary? Why is it important to be precise when writing c
    15·1 answer
  • What are the four primary factors described in the text that set the state for Web 2.0 or the social Web that we enjoy today??
    12·1 answer
  • Can you combine a wireless and wired lan in the same home
    14·1 answer
  • Is a psychrometer more likely used at a beach or a desert in California
    12·1 answer
  • Find the Nearest Repeated Entries in an Array People do not like reading text in which a word is used multiple times in a short
    15·1 answer
  • Which of the following is not a key component of a structure?
    12·1 answer
  • What is the difference between electrical and electronic devices?
    5·2 answers
  • What are node in a computer network​
    14·1 answer
  • What is the output for this program?
    12·1 answer
  • Which privacy protection uses four colors to indicate the expected sharing limitations that are to be applied by recipients of t
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!