Bit20203 - Graphics Programming SEMESTER 1 SESSION 2019/2020
Bit20203 - Graphics Programming SEMESTER 1 SESSION 2019/2020
labsheet #4
Title : Drawing OpenGL Geometric Primitives
Objectives : At the end of the lab session, students should be able to:
(i) set up the OpenGL viewport via orthographic
projection.
(ii) draw a single straight line.
(iii) draw other types of geometric primitives such
triangle, rectangle and polygon.
(iv) assign different color to each geometric primitive.
Date : 9 October 2019 (Wednesday) – S2 & S3
10 October 2019 (Thursday) – S1
INSTRUCTIONS
Based on the codes written in the PowerPoint slides (Introduction to OpenGL) in the previous lab
session,
1
LABSHEET #4 Drawing OpenGL Geometric Primitives BIT20203
(a) (b)
(c) (d)
4. Sample output:
Write an OpenGL program that would be able draw a vehicle (car, motorcycle, bicycle, lorry, etc.)
using the geometric primitives that you have been learned in Exercise 1. You should be able to:
2
LABSHEET #4 Drawing OpenGL Geometric Primitives BIT20203
5. After completing this exercise (Exercise 2 only), you must submit your work and it will be
evaluated by your lecturer. Please consider the following requirements:
a. Prepare a report in Microsoft Word / PDF format.
b. The report must include the
i. Cover page. Write down your particular details such as name, matric no, etc.
ii. Source codes. Copy your code from CodeBlock and paste it in the report.
iii. Sample output. Capture the screenshot image of the output and put it in the
report.
c. Submission deadline: 16 October 2019 (11.59pm).
d. Submit softcopy of your report via Edmodo account using the following naming
convention; LabAssignment2_matrik-no.docx/pdf.