Visualization, Spring'98, Yap

OPENGL IN WINDOWS ENVIRONMENT

DOING HOMEWORK IN Win95/NT ENVIRONMENTS
-- To hand in your homework, you need to compress all your files into one .zip or .exe file, and put them in your sgi account. Then send us the instructions and location of the file.
-- You may use winzip or pkzip compress the file. Both are freely available on the web (although they are really "shareware" which means you should try to contribute).
-- It must be clearly stated that this support of Windows is semi-official (SGI machines and UNIX remains our primary vehicle).
-- We will try to distribute information (that you contribute).
-- There is only one PC in the visualization lab (on the second floor). So, if you intend to work in Windows, we expect you to provide your own machine for most of your work.
WRITING OPENGL PROGRAMS IN WINDOWS

(1) Download OpenGL/glut for Win95/NT from the internet.
	The sites are in our programming page.
	There are two versions, from Microsoft and a more
	efficient version from SGI.
(2) Unzip the files. 
	-- put all the .dll files in the system folder
		(in WinNT, this is usually c:/winnt/system32
		and in Win95, this is c:/Windows/System)
	-- put all .h files in the C++ include directory
		(e.g., c:/Program Files/DevStudio/Vc/include/gl)
	-- put the .lib files in the C++ library directory
		(e.g., c:/Program Files/DevStudio/Vc/lib)
(3) Assume next that we are using Visual C++ 5.0 for
	our illustration (but other C++ compiler should be similar).
	-- build a new project with the Win Console Application.
		(File -> New -> Project tab -> Win32 Console Application)
		Console application refers to a standalone
		application that does not interact with Windows.
	-- set up the link options to include OpenGL/glut libraries
		(Project -> setting -> link tab -> insert
		"OpenGL.lib glu.lib glut.lib" into the project options)
		NOTE: these libraries are the SGI implementation.
		The Microsoft implementation are OpenGL32.lib, glu32.lib
		and glut32.lib.
	-- Now do your programming, as in the SGI unix machines.
		It is important to note that this is only possible
		if you use the glut library.  Otherwise, you need
		to set up fairly involved "graphic contexts", etc
		which is probably not worth the effort (for our purposes).
		[For further details about how to do the latter,
		see the book by Ron Fosner.  You can get the code
		for this book from http://www.directx.com.]
		Another thing: do not include "gl.h" when you use "glut.h"
		because this is unnecessary and moreover, "gl.h" defines
		some of its own Windows API (in case you want to do your
		own openGL program without glut) which may be incompatible with
		glut.
	-- When done, you can build your project (compile and link)
		and execute it.
	
[This is generously contributed by your classmate, Bo Zhang.]

For further information, look for internet links under our
programming homepage.