EAGL.Examples.LearnOpenGL.GettingStarted.HelloTriangleExercise3 (eagl v0.1.0)
View SourcePort of LearnOpenGL's Hello Triangle Exercise 3 to EAGL framework.
Original: https://learnopengl.com/Getting-started/Hello-Triangle (Exercise 3) Chapter 1, Section 2.5: Hello Triangle Exercise 3
This example demonstrates:
- Creating two triangles using separate VAOs and VBOs
- Using the same vertex shader for both triangles
- Using different fragment shaders (orange and yellow)
- Rendering with different shader programs
Run with: mix run -e "EAGL.Examples.LearnOpenGL.GettingStarted.HelloTriangleExercise3.run_example()" Or use the script: ./priv/scripts/triangle
Summary
Functions
@spec run_example() :: :ok | {:error, term()}