Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 450: COMPUTER GRAPHICS INSTALLING GLUT AND GLEW SPRING 2015 DR. MICHAEL J. REALE.

Similar presentations


Presentation on theme: "CS 450: COMPUTER GRAPHICS INSTALLING GLUT AND GLEW SPRING 2015 DR. MICHAEL J. REALE."— Presentation transcript:

1 CS 450: COMPUTER GRAPHICS INSTALLING GLUT AND GLEW SPRING 2015 DR. MICHAEL J. REALE

2 INTRODUCTION The following slides will explain how to install GLUT and GLEW on: Windows Unix/Linux Mac?

3 WINDOWS

4 DOWNLOAD GLUT AND GLEW GLUT: Go to http://user.xmission.com/~nate/glut.htmlhttp://user.xmission.com/~nate/glut.html Download the “bin” version of GLUT 3.7.6: http://user.xmission.com/~nate/glut/glut-3.7.6-bin.ziphttp://user.xmission.com/~nate/glut/glut-3.7.6-bin.zip GLEW: Go to http://glew.sourceforge.net/http://glew.sourceforge.net/ Download the “Binaries Windows 32-bit and 64-bit”: https://sourceforge.net/projects/glew/files/glew/1.11.0/glew-1.11.0-win32.zip/download https://sourceforge.net/projects/glew/files/glew/1.11.0/glew-1.11.0-win32.zip/download Unzip both

5 INSTALL GLUT glut32.dll  copy to: 32-bit OS --> C:\Windows\System32\glut32.dll 64-bit OS --> C:\Windows\SysWOW64\glut32.dll glut32.h  copy to: C:\Program Files (x86)\Microsoft Visual Studio XX\VC\lnclude\GL\glut32.h XX = version of Visual Studio You may have to create the GL folder glut32.lib  copy to: C:\Program Files (x86)\Microsoft Visual Studio XX\VC\lib\glut32.lib C:\Program Files (x86)\Microsoft Visual Studio XX\VC\lib\amd64\glut32.lib

6 INSTALL GLEW Copy the following (NOTE: use the Win32 versions!): bin/Release/Win32/glew32.dll  C:\Windows\System32\glew32.dll bin/Release/Win32/glew32.dll --> C:\Windows\SysWOW64\glew32.dll lib/Release/Win32/glew32.lib  C:\Program Files (x86)\Microsoft Visual Studio XX\VC\lib\glew32.lib include/GL/*.h  C:\Program Files (x86)\Microsoft Visual Studio XX\VC\lnclude\GL\*.h

7 CREATE PROJECT In Visual Studio 2013 New Project Visual C++  Win32 Console Choose “Application Settings” and check “Empty”

8 SETTING UP YOUR PROJECT Right-click on your project name in the Solution Explorer and go to “Properties” Go to “Linker”  “Input”  “Additional Dependencies” Add: glew32.lib glut32.lib glu32.lib opengl32.lib Note items are separated by semicolons!

9 UNIX/LINUX

10 INSTALLING GLUT AND GLEW Both GLUT (or freeglut) and GLEW should be available in your respective package managers That said, you will want to install both the regular and developer (“devel”) versions of the packages: E.g., glut-devel and glew-devel

11 COMPILING YOUR CODE I’m assuming you are using g++ as your compiler If you source file is “HelloGL.cpp”, then use the following command: g++ HelloGL.cpp -o HelloGL -lglut -lGLEW -lGL -lGLU -std=c++11 This will create an executable called “HelloGL”./HelloGL

12 MAC?

13 MAC INSTRUCTIONS (SORT OF) Unfortunately, I do not have a Mac to test installing/compiling/running with GLUT and GLEW on it. GLUT: the following links contains instructions for install GLUT on Mac (and Windows and Unix/Linux) http://web.eecs.umich.edu/~sugih/courses/eecs487/glut-howto/ GLEW: It seems you have to compile it from source, or you have to use Homebrew http://nacho4d-nacho4d.blogspot.com/2012/04/installing-glew-in-macos-x.html If you run into problems (on any of these platforms), let me know.


Download ppt "CS 450: COMPUTER GRAPHICS INSTALLING GLUT AND GLEW SPRING 2015 DR. MICHAEL J. REALE."

Similar presentations


Ads by Google