Draw an array of points in parallel using vao/vbo


Assignment Task: Drawing multiple points that bounce in a circle.

This is achieved by:

1. Draw an array of points in parallel using VAO/VBO for the circle, and for the points that are bouncing in the circle.

2. In display(), clear the drawing area (back buffer) to background color (black),  draw a circle, and then draw multiple points that bounce in the circle. These points can be saved in a VBO and sent to the vertex shader in parallel together, so they can be retrieved by the shaders in parallel. Also, you need to update the points to their new positions as they move in the circle.  You should make the circle and the point(s) different colors.

3.  Since the circle is not changing, design an  array in the constructor, reshape, or init function instead. You can draw the circle using uniform color and the points bouncing using per-vertex color. To deal with this situation, you may use a uniform integer to indicate drawing uniform color or pervertex color. Alternatively, you can create two vertex shaders. I have documented these two situation in the ppt. You may want to draw the circle first, then the points bouncing in the circle. In other words, you load VBO with the circle points and draw them, and then load it with the points that are bouncing in the circle, and draw them.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Draw an array of points in parallel using vao/vbo
Reference No:- TGS03253246

Expected delivery within 24 Hours