How to Install OpenGL - PowerPoint PPT Presentation

About This Presentation
Title:

How to Install OpenGL

Description:

Create a new subfolder called 'OpenGL' in this folder. Copy the following files into this subfolder: OpenGl32.lib. Glu32.lib. glut32.lib. 7 ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 14
Provided by: yapmo
Category:

less

Transcript and Presenter's Notes

Title: How to Install OpenGL


1
How to Install OpenGL
  • Software running under Microsoft Windows makes
    extensive use of "dynamic link libraries." A
    dynamic link library (DLL) is a set of executable
    code that has the following properties
  • the code is loaded at run time only when it is
    actually needed (dynamically linked)
  • it is group of functions for accomplishing common
    tasks (a library)

2
How to Install OpenGL
  • To create code that uses DLL's, you typically
    need 3 types of software
  • header files (.h)
  • these files contain data type definitions and
    function prototypes that allow your code to be
    compiled correctly.
  • They are text files that you can read and study
    to get a better understand of how the software
    works.

3
How to Install OpenGL
  • library files (.lib)
  • these files typically contain function "stubs"
    that know how to invoke appropriate DLL functions
    at run time.
  • these files are used at link time to create your
    executable file.
  • DLL files (.dll)
  • these files contain the actual executable library
    code.
  • these files are invoked at run time.

4
Installation Procedure
  • Step 1 Download the software
  • Step 2 Unarchive the files
  •  Unzip the archive file OpenglSoftware.zip
  • Step 3 Copy the Dynamic Link Libraries (DLL)
    Files to the Operating System Folder Copy the
    files
  • Opengl32.dll
  • Glu32.dll
  • glut32.dll
  • to the folder C\Windows\System. Note The first
    two DLL's may already be there. If it prompts you
    that the file already exists, select the option
    that chooses the file with the most recent date.

5
Installation Procedure
  • Step 4 Copy the OpenGL Header Files to the
    Compiler Folders Go to the "include" folder of
    your compiler.         For Visual C, this
    folder is C\Program Files\Microsoft Visual
    Studio\Vc98\Include Create a new subfolder
    called "GL" in this folder         (if the
    folder already exists, do nothing) Copy the
    following files into the "GL" folder
  • Gl.h
  • Glu.h
  • glut.h
  • Note The first two .h files may already be
    there. If it prompts you that the file already
    exists, select the option that chooses the file
    with the most recent date.

6
Installation Procedure
  • Step 5 Copy the OpenGL Library Files to the
    Compiler Folders
  • Go to the "Library" folder of your compiler.
            For Visual C, this is the folder
    C\Program Files\Microsoft Visual
    Studio\Vc98\Lib Create a new subfolder called
    "OpenGL" in this folder. Copy the following
    files into this subfolder
  • OpenGl32.lib
  • Glu32.lib
  • glut32.lib 

7
OpenGL in Visual C
  • Step 1 Create a personal folder (directory) on
    the C hardrive to save your work.
  • Step 2 Launch Microsoft Visual Studio, Visual
    C

8
OpenGL in Visual C
  • Step 3 Create a new project
  • Under the "File" menu execute the "New"
    command. 
  • Select the project type as "Win32 Console
    Application"
  • If you do not see this as an option, you are not
    in the "projects folder." Select the "Project"
    tab at the top of the window.
  • Type a project name into the edit box. For
    example Lab01 
  • Change the location of the project to your
    personal folder/directory. 
  • Note Never save your work under the Visual C
    folders hierarchy.
  • Select the "OK" button.
  • Select the "An empty project" radio button then
    select the "Finish" button.
  • Select "OK" on the next window.

9
OpenGL in Visual C
10
OpenGL in Visual C
  • Step 4 Add source code files to the project
  • If the files already exist
  • Use "Project" menu select "Add to Project"
    command "Add files" command.
  • Select one or more appropriate files
  • Select "OK"
  • To create new files
  • Use the "File" menu select "New" command select
    the appropriate type of file
  • Enter and edit your text as needed.
  • Save your work
  • Use "Project" menu select "Add to Project"
    command "Add files" command.
  • Select one or more appropriate files
  • Select "OK"

11
OpenGL in Visual C
12
OpenGL in Visual C
  • Step 5 Add the OpenGL library files to the
    project as in step 4.
  • Use "Project" menu select "Add to Project"
    command "Add files" command.
  • Change to the folder that contains the library
    files in the UPM labs, this will be the folder ?
  • If you do not see the files appear, it is
    probably due to the wrong "file type filter"
    change the filter to .lib.
  • Select the following 3 libraries
  • OpenGl32.lib
  • Glu32.lib
  • glut32.lib
  • Select "OK"

13
OpenGL in Visual C
  • Step 6 Execute the program
  • To compile the currently open file   
  • Use "Build" menu select "Compile" command
  • To compile and link
  •  Use "Build" menu select "Build" command
  • To compile, link, and execute        
  • Use "Build" menu select "Execute" command
                         
Write a Comment
User Comments (0)
About PowerShow.com