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
Which function works best when you need to remove an element at a specific index in a list?
natka813 [3]

Answer:

You can use the pop() method to remove specific elements of a list. pop() method takes the index value as a parameter and removes the element at the specified index. Therefore, a[2] contains 3 and pop() removes and returns the same as output.

Explanation:

Hope it helps you!

8 0
3 years ago
TRUE OR FALSE!!! <br> Your location can be tracked via your digital footprint.
laiz [17]
Sadly this statement is true
3 0
3 years ago
Jim has excellent oral and written communication skills. He enjoys public speaking and wants a job in which he will interact wit
fredd [130]
The best job for Jim would be public relations specialist.
7 0
3 years ago
Read 2 more answers
How do you change the username on here?
never [62]

Answer:

I don't think you can. You can try to make an email that has the name you want and use that.

Explanation:

6 0
3 years ago
What are 3 possible causes of getting a "network cable unplugged" message on a pc, assuming that the cable is not actually unplu
Nat2105 [25]
I've had that problem before. The cause of my problem was 2 things and that was the age of the cable, and build up of dust on each of the cable.
7 0
3 years ago
Other questions:
  • What could prevent ping or traceroute responses from reaching the originating device beside network connectivity issues?
    14·1 answer
  • In an interview, an appropriate response to "What is an example of one of your
    13·2 answers
  • The main purpose of a constructor is to initialize the data members at the moment that an object is created. true or false?
    8·1 answer
  • In windows, a(n) ________ follows the file name and a period and indicates the file type.
    9·1 answer
  • Which email client feature allows you to store the names and information of people you contact frequently?
    5·1 answer
  • Given two variables , first_place_winner and second_place_winner, write some code that swaps their associated values. use any ad
    12·1 answer
  • In the event of a network attack or intrusion, a _____ lists the tasks that must be performed by the organization to restore dam
    5·1 answer
  • What is the output?
    12·1 answer
  • Who ever can get me the lyrics to raining tacos will get 46 points + the crown! i want the song!
    10·2 answers
  • In the computer science industry, the process of finding and removing errors from computer hardware or software is known as
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!