Programming - Games - OpenGL and C++

This tutorial was written for me by Imran Khan (imranahmedkhan82@hotmail.com, iak1982@yahoo.com).
Copyright (c) 2004 is owned by Martin Baker

Introduction to OpenGL :

OpenGL is a library of functions for fast 3D rendering.It's a hardware and system independent interface. An OpenGL application will work on every platform, as long as there is an installed implementation.Some of the OpenGL Features are as follows :

  • Varying graphics capabilities without compromising the graphics performance of the underlying hardware and without
    sacrificing control over the hardware’s operation.
  • A natural interface that allows a programmer to describe rendering operations tersely.
  • OpenGL is Flexible . It can accommodate extensions so that newgraphics operations can be added without disrupting the original interface.
  • Its simple, direct interface to the fundamental operations of 3D graphics rendering.
  • Provides basic graphics primitives to draw Points, Lines, Traingles etc

    GL_POINTS - dots
    GL_LINES – lines, in pairs
    GL_LINE_STRIP – polylines
    GL_LINE_LOOP – closed loop
    GL_TRIANGLES – triangles, three vertices
    GL_QUADS – quad, four vertices
    GL_POLYGON – convex filled polygon

  • Provides Camera Effect.
  • Provides Lightning effect.
  • Easy Interaction with the Hardware.
  • For the sake of Hardware independecy, OpenGL provides its own datatypes :
  • OpenGL datatypes :

    C++ OpenGL
    Unsigned int
    Unsigned short
    Unsigned char
    Double
    Float
    Int
    Short
    Signed char
    GLuint
    GLushort
    GLubyte
    GLDouble
    GLFloat
    GLInt
    GLShort
    GLByte

 

  • Opengl Command format is very easy. You can understand it easily from the figure below :


In this Diagram we explained that if we have a command " glVertext2i(...) " then wat will be its format.

 

I hope its enough theory. Now lets start with the Tutorial.

 

next: first program


metadata block
see also:
Correspondence about this page

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.