SGI Windows NT Toolbox

KnowledgeBase

Writing OpenGL programs for NT


System:   any Category:   graphics Last Modified:   12/09/98
OS version:   NT 4.0 Product:   OpenGL Service Pack:  
Description

How do I get started writing OpenGL programs for NT?

Problem Resolution

The OpenGL 1.1 Software Development Kit (SDK) is bundled with Windows NT 4.0. An enhanced version will come with SGI systems, which includes extended headers, additional programming examples, performance analysis tools and a highly tuned native OpenGL implementation.

OpenGL programs are compiled under the Win32 environment, which has a very different build environment from IRIX. Instead of the usual command line tools such as Make and CC, the tools will vary depending on the provider. Microsoft, for instance, has provided some automated tools in the Interactive Development Environment (IDE) to create Microsoft-specific makefiles.

Following is an example of the IRIX build commands and the closest corresponding equivalent for Microsoft Visual C++

IRIX     Visual C++
CC       cl (C++ compiler command)
cc       cl (standard 'C' compiler command)
make     nmake
ld       link
elfdump  dumpbin (for viewing symbol table,etc.)
Note: for the above commands to work, you must run the "vcvars.bat" batch file to pick up a path to the needed executables.

If IRIX-like makefiles are desired, GNU or Cygnus tools offer more traditional makefile support. Check out the following links:

http://www.gnu.org
http://www.cygnus.com

Typical Installation:
A typical development system would include a compiler, such as Microsoft Visual C++ 5.0 or later, the OpenGL SDK, and any other special libraries (for digital media, etc.). Additionally, if your program uses GLUT, you may find one of the following links useful:

http://reality.sgi.com/opengl/glut3/glut3.html
http://reality.sgi.com/opengl/glut3/glut-faq.html

Where to Start:
The best place to start is to compile the examples provided by Microsoft for OpenGL. See the online help in the Interactive Development Environment (IDE) provided by Microsoft.

In addition, there is an abundance of information on these OpenGL websites:

http://www.opengl.org
http://reality.sgi.com/opengl/

Among other things, the above sites contain:

  • Programming courses (some NT/Windows95 specific)
  • Sample programs
  • Tutorials and Documentation
  • Updates and Specifications
  • Windows 95 and NT information
  • Additional toolkits (GLU/GLUT/WGL)
  • Additional references
The SDK provided by SGI contains additional examples and headers. Please see the release notes for OpenGL on your system for futher details.

Advanced OpenGL:
Although there are a multitude of books and online references available for assistance with advanced OpenGL, a good place to start is with the SIGGRAPH course notes. You can find these at:

http://www.opengl.org/Coding/Coding.html?SIGGRAPH#first_hit


Send comments on this case to kbase@sgi.com.


Copyright © 1997-98, Silicon Graphics, Inc.