Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 How to Install OpenGL u Software running under Microsoft Windows makes extensive use of "dynamic link libraries." A dynamic link library (DLL) is a set.

Similar presentations


Presentation on theme: "1 How to Install OpenGL u Software running under Microsoft Windows makes extensive use of "dynamic link libraries." A dynamic link library (DLL) is a set."— Presentation transcript:

1 1 How to Install OpenGL u 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 2 How to Install OpenGL u To create code that uses DLL's, you typically need 3 types of software: –header files (*.h) n these files contain data type definitions and function prototypes that allow your code to be compiled correctly. n They are text files that you can read and study to get a better understand of how the software works.

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

4 4 Installation Procedure u Step 1: Download the software u Step 2: Unarchive the files: – Unzip the archive file: OpenglSoftware.zip u 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 5 Installation Procedure u 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 u 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 6 Installation Procedure u 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 –glut32.lib

7 7 OpenGL in Visual C++ u Step 1: Create a personal folder (directory) on the C: hardrive to save your work. u Step 2: Launch Microsoft Visual Studio, Visual C++ u Step 3: Create a new project: –Under the "File" menu; execute the "New" command. –Under the "File" menu; execute the "New" command. –Select the project type as "Win32 Console Application" n 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 –Type a project name into the edit box. For example: Lab01 –Change the location of the project to your personal folder/directory. –Change the location of the project to your personal folder/directory. n 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.

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

9 9 OpenGL in Visual C++ u 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 n OpenGl32.lib n Glu32.lib n glut32.lib –Select "OK"

10 10 OpenGL in Visual C++ u Step 6: Execute the program –To compile the currently open file: –To compile the currently open file: n Use "Build" menu; select "Compile" command –To compile and link: n Use "Build" menu; select "Build" command –To compile, link, and execute: –To compile, link, and execute: n Use "Build" menu; select "Execute" command n Use "Build" menu; select "Execute" command


Download ppt "1 How to Install OpenGL u Software running under Microsoft Windows makes extensive use of "dynamic link libraries." A dynamic link library (DLL) is a set."

Similar presentations


Ads by Google