OpenGL and GLUT for MS Windows

  1. Setting up OpenGL and GLUT Under Windows
    23 Jan 2003
    
    0) Download the precompiled GLUT 3.7.6 code ( available at
    http://www.xmission.com/~nate/glut.html/).
    
    1) Copy glut32.dll  into the folder, C:\Windows\System , where
    "Windows" is the directory that Windows is installed in.
    
    2) Copy glut32.lib into the folder, "C:\Microsoft Visual
    Studio\VC98\lib" , where "Microsoft Visual Studio" is the installation
    directory of your Visual Studio (the default is Microsoft Visual
    Studio)
    
    3) Copy glut.h into the folder, "C:\Microsoft Visual Studio\VC98\include\GL"
    
    Ignore any .lib's or .dll's that do not contain 32.  The *32 files are
    for the Microsoft implementation.
    
    Update a few settings inside Visual C++. Create a new project or
    workspace for the OpenGL source program you are trying to compile.
    
    Create a win32 console application.
    
    Go to Project->settings. In the Project Settings window, change
    settings from win32 debug to all configurations. Click the link tab on
    the right side, and in the "Object\library modules" box go to the end
    of the text field (that is leave what's already there) and add:
    opengl32.lib glut32.lib glu32.lib
    
    In your source be sure to use the preprocessor directive:
    #include '<'GL\glut.h'>'
    
    

  2. Setting Up GLUT on MS Windows

    Excellent step by step tutorial for setting up and programming using GLUT and OpenGL under MS Windows: GLUT Tutorial and Using OpenGL with MFC

    From: "Gants, Mark E. (UMC-Student)" 
    To: "Palaniappan, Kannappan " 
    Subject: glut and visual c++ setup
    Date: Tue, 23 Jan 2001 23:11:10 -0600
    
    Dr. Palaniappan,
    
    I was going about setting up glut on windows 2k w/ visual studio 6 and ran
    into a problem, but here is a nice solution. I was following the first email
    you had listed under the 'resources' page. It left out one small detail
    though.
    
    I think this website would augment (or replace) that email nicely.
    
    http://www.fatech.com/tech/opengl/glut/
    
    


  3. Overview article about using OpenGL under Windows95 and WindowsNT: An OpenGL Update for Game Developers


  4. Setting up OpenGL and GLUT on Win95/NT
    From: "Kevin M." 
    To: "Palaniappan, Kannappan " 
    Subject: OpenGL, GLUT with Visual C++ 6.x
    Date: Fri, 21 Jan 2000 21:10:59 -0600
    
    Dr. Palaniappan:
     
    Here are possible instructions for using GLUT and OpenGL with Visual
    C++ 6.x.  I know it took me half the semester to discover this, so here
    is the procedure:
    
    First, download the precompiled GLUT 3.6 code ( available at
    http://reality.sgi.com/opengl/glut3/glutdlls.zip).
    As of this mailing, there is a beta version of 3.7, which you can try
    if you like.  The Microsoft OpenGL package is already included in
    Win9x, so those are not needed if you have a fairly recent version of
    Windows.  Now, unzip the files in the glutdlls.zip file and remember
    where they are.  Put the following files in the corresponding
    directories (should match your system fairly well) :
    
    1) glut32.dll  into   C:\Windows\System   , where "Windows" is the
    directory Windows is installed in.
    
    2) glut32.lib into   "C:\Microsoft Visual Studio\Vc98\Lib" , where
    "Microsoft Visual Studio" is the installation directory of your Visual
    Studio (the default isMicrosoft Visual Studio)
    
    3) glut.h into  "C:\Microsoft Visual Studio\Vc98\Include"
    
    Ignore any .lib's or .dll's that do not contain 32.  the *32 files are
    for the Microsoft implementation.  The others should not be used
    because they are the SGI implementation, which is probably not
    supported in MS Visual C++.  The last thing that you need to do is
    change a few settings inside Visual C++.  You may or may not need all
    of these, but it will provide the most functionality over the long
    run.  Start Visual C++ and make sure the sourceprogram you are trying
    to compile has a workspace.  Go to "Project -> Settings..." and find
    the tab labeled "Link".  Add (meaning leave what's already there in
    there) the following text to the text field with the caption
    "Object/library modules" :
       glu32.lib glut32.lib opengl32.lib
    
    Now, one thing to remember: unlike class, comment out any include's
    that reference GL directory, like "include GL/gl.h" or "include
    GL/glu.h" .  These only apply to theimplementation on the UNIX machines
    for class.  Also, MAKE SURE you include glut.h (Put   include "glut.h"
    as a preprocessor command).
    
    When you attempt to compile your program, it should find all the code
    it needs from the libraries you included in the settings.  This should
    allow you to do a lot of the work on a Windows machine, and still be
    somewhat portable to the UNIX machines (Remember toun-comment the files
    found in the GL directory).  Hope this works for you.
    

  5. Setting up OpenGL and GLUT on Win95/NT
    From: "Berry, Richard" 
    To: "Palaniappan, Kannappan " 
    Subject: OpenGL, GLUT with Borland C++ v. 5.01
    Date: Mon, 16 Feb 1998 14:03:05 -0600
    MIME-Version: 1.0
    
           
    Dr. Palaniappan: 
    
    I finally gotten OpenGL, Borland C++ and GLUT 3.6 all to coexist
    peacefully. I thought I would document it so it might help someone else
    attempting the same thing:
    
    To create the environment on a Win95 you need the following: 
    
    GLUT 3.6 precompiled (available at http://imagine.iss.nus.sg:8888/~leo/oglrep/ - an excellent GL 
    resource) Microsoft's OpenGL package (I couldn't get SGI to work with my machine-- it 
    locked it up repeatedly) Borland C++ (I used 5.01; 5.02 should work as well). 
    
    1) Unpack the Microsoft OpenGL95 files. Put the DLL's in \Windows\System directory. 
    Throw the LIB files away. 
    
    2) Create the directory C:\BC5\LIB\GL. 
    
    3) Create the directory C:\BC5\INCLUDE\GL. 
    
    4) Copy all the Microsoft GL files ending in "H" to C:\BC5\INCLUDE\GL (i.e., GL.H, 
    GLU.H). 
    
    5) Get a DOS prompt and go to the C:\BC5\LIB\GL directory. 
    
    6) For each of the Microsoft GL lib's, type the following from a DOS prompt         
    implib opengl32.lib c:\windows\system\opengl32.dll         implib glu32.lib 
    c:\windows\system\glu32.lib This will create usable lib files for the compiler. The lib files 
    that come with the package are set up for Microsoft. 
    
    7) Unpack the GLUT-3.6 precompiled package. Throw the LIB files away. 
    
    8) Copy GLUT32.DLL to C:\WINDOWS\SYSTEM 
    
    9) Copy GLUT.H to C:\BC5\INCLUDE\GL. 
    
    10) Go to a DOS Prompt, then CD C:\BC5\LIB\GL 
    
    11) Type the following:         implib glut32.lib c:\windows\system\glut32.dll 
    
    12) Now go into C++. 
    
    13) DO NOT open a project. 
    
    14) Open your "Options" menu and select "Project." 
    
    15) On the left side of the subwindow, select "Directories."  
    
    16) There are two entries to change:  
    
    16a) Add to the include path, ";c:\bc5\include\gl" 16b) Add to the lib path, ";c:\bc5\lib\gl" 
    
    17) Click OK.  
    
    To start a project: 
    
    1) Create the project, then delete the files below the EXE line. 
    
    2) Add your file(s). 
    
    3) In each C file, include the following:         #include  
    
    4) Add the following nodes to your project:         c:\bc5\lib\gl\opengl32.lib         
    c:\bc5\lib\gl\glu32.lib         c:\bc5\lib\gl\glut32.lib 
    
    I've compiled several of the already-completed projects. Some of the behavior can be a little 
    unusual, such as circles drawing AFTER your start your next draw. I find it good enough 
    to do the bulk of the coding on the Windows machine, with the final polishing and 
    refinement done on the SGI machines. Hope this helps.
    

  6. Setting up OpenGL and GLUT on Win95/NT
    From: "Ben Forrester" 
    To: "Palaniappan, Kannappan " 
    Subject: Using GLUT and OpenGL for Windows with Borland C++ 5.0
    Date: Wed, 11 Feb 1998 17:14:56 -0600
    MIME-Version: 1.0
    X-Priority: 3
    X-MSMail-Priority: Normal
    X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
    
    Dr.  Palaniappan, 
     
    Here are the instructions you requested for getting OpenGL and GLUT to work on Borland  
    C++ 5.0
     
         Download the GLUT for  Win32 source code and unzip the zip file (glut-win32.zip); 
    the files have long  filenames, so make sure you use a zip program that supports this 
    (WinZip 6.2 is  good).  After you've extracted them, say to "\bc5\glut-3.6",  start BC++.  
    Click the Options menu->project and edit the Source  Directories.  Change the Include to  
    "c:\bc5\include;c:\bc5\include\gl" and the Library  to"c:\bc5\lib;c:\bc5\lib\gl".
     
    Then go to http://www.berkelium.com/OpenGL/sgi-opengl.html  and download the sgi 
    version of OpenGL for Windows and install it onto your  computer.
     
    Download http://www.geocities.com/SiliconValley/Heights/5456/project.zip  which 
    contains the ide file to compile a project. Extract glu.lib, glut.lib, and  opengl.lib to 
    "\bc5\lib\gl"  and glut.h to  "bc5\include\gl" you may also need to put glut.dll into your  
    "windows\system" directory but I'm not sure about that. Extract the  rest of the files to a 
    temporary directory and open gears.ide in BC++. You  should be able to make the project 
    and run it. 
     
    To compile and run our program  files, I simply removed blender.c from the project and 
    added bresenham.c for  example. The only modifications that need to be made are to add 
    "#include   and "#define WIN32" if it is not included in the  definition 
    section of your project. You should then be able to make your  projects and run them on 
    your Windows machine. 
     
    I was able to glean this information from Justin Coleman at nagzul@discoveryonline.com 
    he was  very helpful in answering my questions. He is also the creator of the project  file I 
    used. I think this should enable you to get GLUT and  OpenGL up and  running. If you 
    have any questions just e-mail me, Ben Forrester at c713379@showme.missouri.edu. You  
    may also find the comp.graphics.api.opengl newsgroup helpful in finding answers  if you 
    are able to wade through all of the messages. You may also want to look  at 
    http://iip.ucsd.edu/courses/Spring97/cse167/course/borland.txt  it offers an alternative 
    method of getting it to work but I didn't have much  luck with that method. 
     
    Sincerely,
     Ben Forrester c713379@showme.missouri.edu  
    
    

  7. Setting up OpenGL and GLUT on Win95/NT
    Comments: Authenticated sender is 
    From: "Ted Peterson" 
    Organization: The Digital Missourian
    To: palani@ece.missouri.edu, ccjohnh@showme.missouri.edu
    Date: Sun, 11 May 1997 14:28:13 +0000
    Mime-Version: 1.0
    Subject: GLUT-NT
    Reply-To: ted@digmo.org
    Priority: normal
    
    Dr. Palaniappan,
       Here's the instructions that you wanted on using the GLUT 3.3
    library with Win95/NT and Borland C++ 5.01.  GLUT-NT can be
    downloaded from Nate Robins' GLUT for Win32 page:
    "http://www.cs.utah.edu/~narobins/glut.html".  He has pre-compiled
    libraries for Microsoft Visual C++ 4.2 and Borland C++ 5.0.  I
    couldn't get it to work with BC++ 4.5 because Borland's Object
    Windows Library (OWL) for Win32 was beta, so decided to upgrade to
    5.0.  I bought 5.01, which didn't link with Robins' library
    compiled with BC++ 5.0, so I had to recompile it.  Most people will
    have MS Visual C++ instead of Borland C++, but hopefully these
    instructions will save somebody some frustration.
       Download the GLUT for Win32 source code and unzip the zip file
    (glut-win32.zip); the files have long filenames, so make sure you use
    a zip program that supports this (WinZip 6.2 is good).  After
    you've extracted them, say to "\bc5\glut-3.3", start BC++.  Click the
    Options menu->project and edit the Source Directories.  Change the
    Include to "c:\bc5\include;c:\bc5\include\gl" and the Library to
    "c:\bc5\lib;c:\bc5\lib\gl".  Click Ok, then Options menu->save.
    Click the New Project icon under the Edit and Search menus.  Type
    "c:\bc5\glut-3.3\glut.ide" for the project path and name.  Change
    Target Type to "Static Library(for exe)" and click Ok.  Right-Click
    on glut.lib, select "Edit Local Options", select Librarian, then
    change the Library Page Size to 32.  Right-Click on glut.lib, select
    "Add Node", then select files of type "Source (*.cpp,*.c,*.h,*.hpp)"
    and select the first two columns.  Continue to right-click on
    glut.lib and select columns until all the files are added to the
    project.  Before compiling the library, copy glut.h (in the "gl"
    directory where the source was extracted) to "c:\bc5\include\gl" and
    open it in an editor.  I changed "#include " to "#include
    ".  Now, in BC++, right-click glut.lib and select
    "Build Node".  Any compilation errors will show in a message dialog
    box as red exclamation marks.  Fix any errors, and recompile until it
    builds correctly.  I got an error with glut_win.c, so commented-out
    "if (!GLUT_WIND_HAS_DEPTH(mode)) pfd.dwFlags != PFD_DEPTH_DONTCARE;"
    to get glut_win.c to compile.  Then, in glut_get.c, I changed "return
    pfd.dwFlags & PFD_SWAP_LAYER_BUFFERS;" to "return pfd.dwFlags;" to get
    glut_get.c to compile.  These should be the only changes, but if
    another file doesn't compile, make sure it has "#include "
    included.  Once glut compiles, "copy \bc5\glut-3.3\glut.lib
    \bc5\lib\gl".
       To compile programs, just creat a new project that includes the
    newly created glut.lib library and the source files (there's no need
    to include the header files in the project if they're included in the
    source).  You can change the C files to CPP files for better type
    checking.  Also, OWL uses OwlMain() instead of main(), so make sure
    you rename main() to OwlMain, and use the correct parameter list.
    e.g. "int OwlMain(int, char**)".  Running the compiled programs from
    within BC++ sometimes gives thread errors or crashes, so execute the
    glut programs from Windows Explorer or the command line.  Some of the
    included demo programs use glu32.dll, opengl32.dll, and possibly
    gdi32.dll.  If you don't have them, you can do an ftp search for them,
    and place them in your c:\windows or c:\windows\system directories.
    The file "README.NT" explains the differences between the Win32 and X11
    versions of GLUT, and more information on GLUT can be found at the GLUT
    web page:  "http://reality.sgi.com/mjk_asd/glut3/glut3.html".
    --Ted Peterson
    
    

  8. SGI Newsreport
    May 19, 1997
    SGI today unveiled a new era in 3D graphics with its release of
    a technology roadmap for expanding the industry-standard OpenGL(R)
    graphics application programming interface (API).  The company revealed
    API modifications and extensions that would help drive the graphics
    market -- from PCs to supercomputers -- to a new level in visual
    computing.  In addition, the company discussed an OpenGL scene graph
    toolkit currently under development as approved by the OpenGL
    Architectural Review Board.  Slated for completion by Silicon Graphics
    later this year, the toolkit will vastly simplify high- performance 3D
    graphics creation.
    
    Central to the technology roadmap is the OpenGL scene graph toolkit, a
    high-level, object-oriented API that allows developers to create and
    manage 3D images much more simply than ever before.  The scene graph
    toolkit is the manifestation of more than five years of deploying
    similar technology to high-performance graphics application developers.
    The toolkit manages system graphics resources and supplies essential
    functions from existing toolkits, while allowing applications to make
    calls at the basic OpenGL level.  Because it is based on OpenGL, the
    scene graph toolkit is nonproprietary and efficiently scales from PCs
    to supercomputers.
    
    Next-generation toolkits in the OpenGL suite will include revisions to
    Open Inventor(TM) and IRIS Performer(TM), fitting into the scene graph
    framework for both the CAD and visual simulation markets.  Silicon
    Graphics in March announced OpenGL Optimizer(TM), the next-generation
    toolkit designed to improve the rendering and interactivity of large
    CAD/CAM/CAE data sets.  The company also offered the OpenGL Optimizer
    technology to an industry consortium, which is currently being formed
    to seek a standard CAD/CAM/CAE API.  OpenGL Optimizer is an
    object-oriented, extensible framework designed to improve the
    visualization and interaction performance of today's applications by an
    average of two to ten times.  The library elements are standard C++
    code that will run on a wide range of hardware platforms, including PCs
    running Microsoft Windows NT(R) or Windows(R)95, and UNIX(R)
    workstations.
    
    With more than 50 hardware developer licensees, OpenGL has the broadest
    industry support of any graphics API.  Hardware-developer licensees
    include Digital Equipment Corp., Hewlett-Packard Co., IBM Corp., Intel
    Corp., Sun Microsystems, Inc. and a growing number of 3D graphics chip
    set and board vendors, including 3Dfx, 3D Labs and ATI.  Software
    developers writing to the OpenGL API include leading application
    vendors such as Activision, Alias/Wavefront, GT Interactive, id
    Software, Microsoft Corp., MultiGen, Parametric Technology Corp. (PTC),
    Quantum Access, and Structural Dynamics Research Corp. (SDRC).