
glutInitDisplayMode() is used to declare various modes of display.

Here, glutInit() is used to initialize the GLUT library. GlutCreateWindow("Lab-1, Code 1: Creating a triangle and displaying it.") First, let's break down the main function. Now run the program and it should run without any error. After that, your project will be created, open main.cpp located in project_name/sources. If you're asked to give MinGW directory, just select the directory of MinGW folder. Now, run CodeBlocks, Go to File->New->Project., Select "glut" and continue by clicking next. Just follow the same steps as shown above for visual studio directory. Now you've successfully installed glut package for CodeBlocks.

Copy "glut32.dll" to the directory C:\Windows\System.Copy the "glut32.lib" file to the lib directory C:\Program Files (x86)\CodeBlocks\MinGW\lib (Choose your installation directory).Copy the "glut.h" file to the include directory C:\Program Files (x86)\CodeBlocks\MinGW\include\GL (Choose your installation directory).Now go to "glut-3.7.6-bin" folder which is attached in this repository.If you don't know which one to choose, simply download Codeblocks *.* mingw setup.exe where *.* refers to the latest version of CodeBlocks. Download and intall CodeBlocks from their official site.In the very first lab, our focus is to install necessary files and execute an example file which is creating a triangle and displaying it. Task-01: Create a 3D cube manually, set up the gluLookAt() and gluPerspective() functions and modify each value of these functions via keyboard.Task-02: Rotate an object with respect to a line via keyboard.Task-01: Show individual shapes of a leaf and Rotate, Scale or Translate them via keyboard.Task-01: Rotate the star of the last lab continuously.Task-03: Create the same leaf for 5 times to make a Star.Task-01: Basic code to draw a Triangle using Glut.Here is the list of the labs and tasks which are covered in this repository:

This article is inspired by his guidelines. You don't need to know any additional coding skills rather than simple C++ syntaxes to get started.īefore moving further, I want to express heartfelt gratitude towards my respected teacher Mahit Kumar Paul Sir. But how well do we know about the very basic concepts of computer graphics? How these complex structures are built? How the camera is set and what will be the effects of clipping? This repository contains codes of different concepts from Computer Graphics and step by step explanation for better understanding. For example, in 2D and 3D games, computer software, UI and UX design, camera positioning, clipping and so on. Computer graphics are used almost everywhere. In today's world, computer graphics is a common phenomenon. Computer Graphics and Animation Codes and Description
