1. Introduction to Computer Graphics (Glut)

INTRODUCTION

What is Computer Graphics?

  • Branch of Computer Science.
  • Computer + Graphs + Pics = Computer Graphics.
  • Drawing line, Chart, Graphs etc. on the screen using Programming language is computer Graphics.

Book Definition

  • Computer graphics is the branch of computer science that deals with generating images with the aid of computers. It displays the information in the from of graphics objects such as picture, charts, graphs and diagrams instead of simple text. We can say computer graphics makes it possible to express data in pictorial form.

OpenGL

GLUT

How to install OpenGL / Glut (Ubuntu)

  • Step 1: sudo apt-get update
  • To update your basic packages
  • Step 2: sudo apt-get install build-essential
  • For installing essential packages.
  • Step 3: sudo apt-get install freeglut3-dev
  • Step 4: sudo apt-get install binutils-gold
  • Step 5: sudo apt-get install mesa-common-dev mesa-utils
  • Step 6: sudo apt-get install libglew-dev libglew1.5-dev libglm-dev
  • Step 7: glxinfo | grep OpenGL

Create cpp file and write your code

Run on terminal:

  • g++ MyProg.cpp -lGL -lGLU -lglut (for C++ program)
  • ./a.out