SGI Windows NT Toolbox

KnowledgeBase

Cross-platform development (IRIX & NT)


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

Could you provide me some examples on how to best accomplish cross-platform development between IRIX and NT?

What toolkits and/or libraries are available to ease the transition?

Problem Resolution

On systems running IRIX, most programs are written using a combination of OpenGL and X, Motif or Viewkit. SGI's new platforms run Microsoft Windows NT, which currently supports OpenGL 1.1. However, NT does not include an X server, so programs that use X, Motif or ViewKit must be ported to the native window libraries of NT (Win32, MFC). There are several options available to this end.

The first would be to separate the user interface from the internal code. The idea is to share the greatest amount of code between the IRIX and NT versions by providing an abstraction between the bulk of code and the user interface. Separate user interface code would have to be written for Motif and MFC. The up-side of this method is that performance, appearance and user interaction can be maximized on both platforms. However, depending on how the application code is structured, this may be very difficult.

Another option is to port to Win32/MFC native. This probably has the shortest development cycle, but it may not be suitable to your particular application. There are several 3rd party toolkits that can aid the port back to IRIX, should you choose this route. One good example is:

Mainsoft - Win32/MFC library compatibility library for IRIX
http://www.mainsoft.com
You may also opt to use a 3rd party Motif/X library. Although there are 3rd party toolkits that provide the functionality of X and Motif, which may simplify the port, they may not meet your performance needs. Basically, they might provide a relatively quick port of existing code, but could have performance, interaction and appearance differences. Here is an example of one such product: http://www.datafocus.com/products/nutcracker/ Finally, you may use your own, or some other cross-platform, toolkit. Such a toolkit is neither MFC or Motif, but may be built on top of it. The toolkits have their own API's and functionality, and are designed to support a multitude of operating and windowing systems. The nice thing about this method is that it provides one source base for both products. However, user interaction, performance and appearance may not be perfect, and it would be another API to learn. Some useful links on this are here: Cygnus - UNIX-like API (POSIX.1/90), UNIX tools
Excerpt from http://sourceware.cygnus.com/cygwin/usenix-98/cygwin.html:

"Cygwin32 is a Dynamic-Linked Library (DLL) that provides a large subset of the system calls found in common UNIX implementations. The current release includes all POSIX.1/90 calls except for setuid and mkfifo, all ANSI C standard calls, and many common BSD and SVR4 services including Berkeley sockets."

http://sourceware.cygnus.com/cygwin/

Perforce - Software Configuration Management System (RCS-based)
http://www.perforce.com

List of Books About Windows NT:
http://support.microsoft.com/support/kb/articles/q130/3/75.asp?FR=0

Please note that SGI does not endorse any of the above products. They are listed as references only.


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


Copyright © 1997-98, Silicon Graphics, Inc.