Computer Graphics - PowerPoint PPT Presentation

About This Presentation
Title:

Computer Graphics

Description:

Computer Graphics Lab 1 OpenGL * What is OpenGL? * What is OpenGL? OpenGL is a software interface to graphics hardware. You can use to specify the objects and ... – PowerPoint PPT presentation

Number of Views:204
Avg rating:3.0/5.0
Slides: 14
Provided by: Mathem96
Category:

less

Transcript and Presenter's Notes

Title: Computer Graphics


1
Computer Graphics
  • Lab 1
  • OpenGL

2
What is OpenGL?
3
What is OpenGL?
  • OpenGL is a software interface to graphics
  • hardware. You can use to specify the objects
  • and operations needed to produce interactive
  • three-dimensional applications
  • OpenGL is designed as a hardware-independent
    interface to be implemented on many different
    hardware platforms.

4
OpenGL
  • The most popular raster graphics library,
    providing a powerful but primitive set of
    rendering commands
  • Already supported by every window systems
  • OpenGL Utility Library (GLU) higher-level
    routines, part of OpenGL implementation
  • Setting up matrices for specific viewing
    orientations and projections
  • Performing polygon tessellation and rendering
    surfaces
  • OpenGL Utility Toolkit (GLUT) window
    system-independent high-level library. Need to
    install this library separately.

5
OpenGL
  • Install OpenGL Utility Toolkit (GLUT) for MS
    Windows
  • Download GLUT from
  • http//reality.sgi.com/opengl/glut3/glut3.html
  • Unzip the package
  • Set include directory and lib directory in
    the C Compiler to include the directory
    containing glut.h, glut.lib
  • Copy glut32.dll into directory
  • DRIVE\WINNT\SYSTEM
  • Add include ltglut.hgt to the beginning of the
    program

6
OpenGL
  • OpenGL Programming Guide
  • http//www.cs.ucf.edu/dsg/dtran/teaching/cps5
  • 60/openGL/install/theredbook.zip
  • Nate Robins OpenGL Tutors
  • http//www.cs.utah.edu/narobins/opengl.html

7
  • If you are using a PC, OpenGL is included with
    all versions of Windows. You will have to get
    GLUT from the web. For windows you can download
    just the dll, lib and .h files. You should find
    OpenGL32.dll and glu32.dll with your system
    files. You should find the corresponding lib and
    .h files supplied with your compiler. The
    corresponding GLUT files should be placed with
    them.

8
OpenGL
  • how to install the glut libraries and dll's ?
  • glut.dll
  • glut32.dll
  • glut.h
  • glut.lib
  • glut32.lib

9
  • Files .h, .lib, .dll
  • The entire folder gl is placed in the Include
    directory of Visual C
  • The individual lib files are placed in the lib
    directory of Visual C
  • The individual dll files are placed in
    C\Windows\System32

10
  • Copy both glut.dll and glut32.dll into your
    windows directory (WINDOWS , or WINDOWS
    \System32)
  • Copy your glut.h to
  • ltdrivegt\ltVC pathgt\include\GL\glut.h
  • put the drive where you installed VC
    instead of the ltdrivegt
  • put the directory where you installed VC
    instead of the ltVC pathgt
  • 3. Copy your glut.lib and glut32.lib to
  • ltdrivegt\ltVC pathgt\lib\glut.lib
  • ltdrivegt\ltVC pathgt\lib\glut32.lib

11
  • how to setup VC so that you can use the glut
    libraries?
  • Start VC and create a new project.
  • 2. The project has to be a "Win32 Console
    Application"
  • 3. Type in the name of the project and where it
    will be on your hard drive.
  • 4. Chose an empty project and click next or
    finish
  • 5. First thing you need to do when the project
    opens up is to click on the "Project" menu item
    from the top.
  • 6. Chose "Settings" (a window will come up)
  • 7. On the left side of the window there are tabs,
    chose the "Link" tab
  • 8. The string field labeled "Object/library
    modules" has a few lib files already set in it
  • 9. Go to the end of this string field and enter
    opengl32.lib glut32.lib glu32.lib
  • 10. Chose "OK" and that will include all the
    opengl libraries that you need
  • 11. Now all you need to do is include ltgl\glut.hgt
    and you are ready to go

12
(No Transcript)
13
Example
Write a Comment
User Comments (0)
About PowerShow.com