Computer Graphics
Ctrlk
  • 5CM507 Graphics 2025/26
    • Module
    • Schedule
    • Assessments
    • Labs A (Autumn 2025)
      • LabA01 Hello OpenGL
        • Task 0.a [opt] Create the project folder
        • Task 0.b [opt] Configure CMake
        • Task 1.1 Create an OpenGL window
        • Task 1.2 Draw a triangle
          • Step 7 A 2D triangle
          • Step 8 initTriangle()
          • Step 9 drawTriangle()
          • Step 10 Call triangle functions in main()
        • T1.3 [opt] Commit code to Github
        • Tutorials that might be helpful
      • LabA02 Shaders and Transforms
      • LabA 03 Meshes and Scene Graphs
      • Lab A04 View and Projection
      • Lab A05 Let There Be Light
      • Lab A06 GGX Lighting with GenAI
      • Lab A07 Texture Mapping
      • Lab A08 Normal Mapping
      • LabA09 Shadow Maps
      • LabA10 Image Space Effects : Bloom
      • LabA11 Picking and Collision Detection
    • Resources
    • People
Powered by GitBook
On this page
  1. 5CM507 Graphics 2025/26
  2. Labs A (Autumn 2025)
  3. LabA01 Hello OpenGL

Task 1.2 Draw a triangle

Step 7 A 2D triangleStep 8 initTriangle()Step 9 drawTriangle()Step 10 Call triangle functions in main()
PreviousStep 6 RunNextStep 7 A 2D triangle