learnGL

1) first triangle

Screenshot 2024-03-06 at 01 08 25

2) 2 triangles

Screenshot 2024-03-08 at 16 01 07 Screenshot 2024-03-08 at 16 01 22

3) exercises done

  1. Try to draw 2 triangles next to each other using glDrawArrays by adding more vertices to your data.
  2. Now create the same 2 triangles using two different VAOs and VBOs for their data.
  3. Create two shader programs where the second program uses a different fragment shader that outputs the color yellow; draw both triangles again where one outputs the color yellow.
Screenshot 2024-03-08 at 20 28 21

4) Change collors with uniforms, depending on time

Screen.Recording.2024-03-09.at.19.49.01.mov

5) Use vertex shader to pass color trough, storing color information in vertices, on location 1, fragment interpolation in action.

Screenshot 2024-03-09 at 23 41 20

6) exercises done

  1. Adjust the vertex shader so that the triangle is upside down.
  2. Specify a horizontal offset via a uniform and move the triangle to the right side of the screen in the vertex shader using this offset value.
  3. Output the vertex position to the fragment shader using the out keyword and set the fragment’s color equal to this vertex position (see how even the vertex position values are interpolated across the triangle). Once you managed to do this; try to answer the following question: why is the bottom-left side of our triangle black?

7) learn about textures and here is the result

Screenshot 2024-03-11 at 01 59 57

8) added second texture, blend them together, specify sampler location using uniforms trough shader class

Screenshot 2024-03-14 at 00 29 59