2

I have typed out a rather large file in C code that is defining OpenGL graphics and will draw a triangle on the screen. While I know all of the functions of the X Windowing System, I do not know how to compile the program on an IRIX system...

I want to see the limits of this computer, and I am prepared to program a whole OpenGL application if that is what it takes...

How do I create a "make" file and how do I include any files? Do I just do the standard

#include <GL/gl.h> 
#include <GL/glu.h>
#include <GL/glx.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>

includes, or do I need something else? I have a full install of IRIX ready for use.

have learned the C programming language and have programmed several projects in OpenGL Fixed Function Pipeline and Programmable Pipeline in many different languages.

I installed IRIX version 6.5, which was released in, I believe, 2003, so the OpenGL pipeline is still Fixed Function (the programmable pipeline not actually being available until 2.0, and being mandatory at version 3.0).

The question in a nutshell is: 1) How do I create a make file for an IRIX shell. 2) Where are the files that I have above at in the computer? 3) Do I have to specify anything else such as environment variables, or is that done in the makefile? 4) Is there anything else I am missing from the files?

I have some documentation that I have been reading, but it is not clear about if I should set any variables to include any of these files, or if I have to download any SDKs. While I do have netboot, it is annoying to deal with, and has a very high chance of not working.

Thanks!

-rjhwinner03

6
  • 1
    The obvious things to try are which cc (or look directly for cc in the PATH dirs), and man cc. Similarly, man make. I'd assume IRIX works the same way as all the other unixes. There should be plenty of tutorials how to write a Makefile online if you can't figure it out from the man-pages.
    – dirkt
    Commented Sep 16, 2018 at 7:09
  • 2
    IRIX applications actually weren't plain X or OSF/Motif applications. SGI provided convenience/desktop integration libraries named IRIS ViewKit for C++. GL was hidden behind another C++ library, Open Inventor. Classic SGI development is thus C++, not C. Describing how to use these toolkits is way too broad, however.
    – tofro
    Commented Sep 16, 2018 at 7:39
  • My Question is How do I use the MIPSPro compiler. Is it even on the Indy's? How do I make a makefile for mipspro and where do I put it? Commented Sep 27, 2018 at 2:03
  • Also the GL on Irix was an SGI product. OpenGL was later based on it but the two are not exactly the same.
    – Ethan
    Commented Oct 3, 2018 at 22:07
  • @rjhwinner03 : the IRIX MIPSPro compiler requires a license key. Let me know if you got one
    – mfro
    Commented Jan 26, 2019 at 10:12

1 Answer 1

9

I did a similar thing in the mid 00's. An R5K Indy can throw a couple hundred flat shaded polygons around at a respectable framerate, depending on their size, and the graphics sub-system installed. There are a couple options, one having just a frame buffer, and at least one other that had onboard geometry hardware.

Indy machines have no texture memory and will perform very poorly on textured graphics. An O2 will perform excellent. It has a shared memory graphics sub-system that can actually handle very large 100mb+ images as textures and do so frame locked to the display. These machines very widely in their overall capability and a lot depends on the option boards installed.

Here is what I remember: (I do not have an IRIX machine to sort out more, but this info should help)

MIPSPro was an additional installation on IRIX. Versions prior to IRIX 6.5.11, I believe, will compile programs and just include nag messages that encourage you to get a license. Later ones refuse to compile. An older MIPSPro is difficult to use on a newer IRIX. You want a newer IRIX for other reasons, like installing more recent Open Source Software, which SGI referred to as "freeware."

GCC and friends are on the Freeware distribution CD. It is likely the packages can also be found online. This will be a fairly old version of GCC today, but should suffice for what you are doing. Ask around at the forum I linked below for other info.

For either compiler, you want to load the full "Development Foundation" distribution CD, which includes header and library files necessary for your program to be compiled. This is necessary whether you use MIPSPro, or GCC.

GCC is recommended, unless your version of IRIX is old enough to make the more permissive version of MIPSPro an option. Even then, you probably want GCC as MIPSPro can be a bit different to work with, though it's well documented.

The Internet Archive has IRIX installation media:

https://archive.org/search.php?query=sgi+irix

You may find what you need there. You may also benefit by asking this question at one of the more active IRIX communities currently online:

https://forums.irixnet.org/

They may have more current libraries and GCC tools to work with. If so, use them.

Edit: I did not make this sufficiently clear: Once you have installed the "Development Foundation" you can then install OSS dev tools however you want or need to and need only point them to the header files needed to build software. It is, in my opinion, easier to start with the SGI inst packages, but a tarball can work just fine too.

Regarding your program: Your first three includes should work. I am not sure about the X related ones. The SGI X Server was a highly customized version of 3WM, called 4dwm. It had extensions to make 3D GL graphics network transparent. (GLX)

A great resource for this kind of thing is the SGI Developer Books. Here's an example:

http://retrogeeks.org/sgi_bookshelves/SGI_Developer/books/OpenGLonSGI/sgi_html/ch01.html

Those can also be installed via the "Documentation" CD, and as part of the "Development Foundation" CD.

Use "inst" to launch the system software manager from the command line, or the much easier to understand, "swmgr" from any terminal on your Indigo Magic Desktop. All SGI system software, including freeware and the GCC compiler, can be installed via this tool. It's advanced, featuring version management and a lot of installation options. As was typical for many SGI system tools, "swmgr" is just a spiffy GUI front end to "inst", which does the real work.

Newer versions of Software Manager can install right over the Internet via URL, (though I doubt https) and pretty much all versions can install from something like an NFS share. You may be able to mount the CD images on a machine and get the tools onto your SGI that way.

If you burn an actual CD, make sure you use ISO9660 format in order for it to work under all "inst" use cases, including installing a new instance of IRIX on an otherwise blank system.

2
  • 1
    Read what you wrote @spud and decided to even create an account here just to tell you how helpful that is, and thank you! What a great post to write up, so much of this type of information gets lost to the digital graveyard over time. I have 2 Indigo^2's that I may rev up someday... so you may have helped even more hardware live than you knew at the time.
    – davex
    Commented Jun 1, 2023 at 0:54
  • 2
    Nice! Yeah, I feel the same way and Discord is making this problem worse. Forums are kind of boring compared to how excellent Discord is, but good info just evaporates in Discord while it endures in a forum. It is nice to know others may be reviving IRIX hardware. Those machines are a lot of fun.
    – Spud
    Commented Jun 1, 2023 at 15:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .