Once you've logged in, you can edit your programs with vi or emacs and compile with make. If you are logging in from a machine with Xwindows, you can run xedit and other X utilities by entering the command "xhost +" before you use the rlogin command, and the command "export DISPLAY=hostname:0.0" (where hostname is the network name of the machine from which you have logged in) after you have used the rlogin command. You can find your machine's network name by entering the command "hostname". In csh ("c shell"), the equivalent command "setenv DISPLAY hostname:0.0".
You *cannot*, however, execute programs with OpenGL calls remotely. Unfortunately, jot is one of these programs. Executing graphics programs is possible only if you are logging in from a Silicon Graphics machine not located in the Indy lab, or an Xwindows machine with a native OpenGL library. If you fall into either of these categories, see your TA.
Exercise 1: Logging in and getting a work area 1) Log in to the machine. It is sometimes easy to forget that you must move the mouse pointer so it is INSIDE the white 'logo' screen in order to enter your login name. Enter your login name, and hit enter. You will then be prompted for your password, which will not be shown on the screen. IF you think you typed it incorrectly backspace to the beginning of the field and try again. 2) Once you are into the machine, you will probably be faced with a single menu and one icon labeled 'Console'. Different accounts may be set up differently, but you should at least see both of these items. Set up a window to work in. To do this go over to the menu, with the mouse pointer and click on the item called 'Desktop'. That should bring up a sub-menu. Click on 'Unix Shell'. You should now have another window open which you can use to work in freely. Exercise 2: Creating A Work Directory and Editing Files 1) You'll want to keep the work for this class organized separately from other classes you might have. Therefore create a new directory for it by typing: mkdir cs4390 (or whatever name you wish to give the directory). 2) Change to this new directory so that you can work in it. cd cs4390 (or whatever you called it) 3) Copy the files for this session into this new directory: cp ~cs4390/OpenGL/Makefile . cp ~cs4390/OpenGL/ex1.c . 4) In this case, you can skip directly to Exercese 3. If your source file was not named ex1.c, however, you would need to edit the Makefile before you could compile the c program. While both emacs and vi are available on the SGI machines, there is also another very simple to use 'visual' editor on the system called jot. Edit the Makefile by typing jot Makefile 5) To change the name of the program being compiled, search for the current program name, 'ex1'. You can do this in one of two ways. a) Move the cursor up to the menu bar and choose 'Select' hold the mouse button down, and move the mouse down until the 'Search Forward' option is highlighted, and release the mouse button. b) Press Shift, Alt and 'F' all at the same time. 6) Enter the search string 'ex1' and hit enter. The editor will automatically find the word project and highlight it. Delete the word 'ex1' by hitting the Delete Key. Type in the name of the new program. 7) Save the file by moving up to the menu bar and selecting the File menu, and then moving the cursor down to 'Save'. [This can also be accomplished by using Alt-S] 8) Exit the editor by going to the File menu and then moving the cursor to 'Exit'. [or type Alt-Q] Exercise 3: Compiling and Running the Demo Program 1) Move the cursor back into the Unix window. 2) Type 'make'. This is the command you should always use with this Makefile, and other than changing the project name as above this Makefile should be usable to compile all of your programs for this class. 3) Run the program by typing 'ex1'. You can exit by pressing the ESC key. Exercise 4: Using On-Line Help System The SGI machines have an EXTENSIVE help facility, and you will almost certainly be using it by the end of the quarter unless you are very familiar with OpenGL (or decide to go buy an OpenGL book at one of the bookstores). The most useful part of the help system is the 'On-Line Books'. 1) Go back to the main Desk Menu (upper left corner of the screen) and click on 'Help' 2) Go down to the 'On-line books' option, and click on it. Depending on your configuration this may bring up an icon, or an entire window. If it brings up only the icon, explode the icon by clicking on it. 3) You'll see a scroll option with a large number of 'book' icons and names listed. While many of the may be useful to you (including the C/C++ books) the main one that you'll probably want is about half way down the list. Scroll down until you find the OpenGL Programming Guide (it's the first 'all grey' book icon) Open this book by double clicking on it. Again this may come up in icon form. If so click on the icon to open the book. *WARNING* To clear up your screen, you can 'iconify' the book list now, but do not 'close' that window, or the programming guide will also disappear. 4) The book window will be in two panels. The top panel is a 'chapter list' of the book. The lower panel is the actual 'book text' Explore around in the book. The chapter you are currently reading will be highlighted in the upper panel, and you can jump directly to other chapters by clicking on them in the upper panel. The on-line book system also offers a search option which can be used to find certain topics (or reference certain routine names you need the call format) and will highlight all of the occurances through the book and make it easy to search through and find what you need. 5) Explore around the other available books and help options. In one of the intro files I posted to the class newsgroup there are paths for demo programs (which I have not tried but I think are available). 6) When you want to log out, just select the 'Log Out' option by either moving the cursor out of all the windows (against the plain background) and select 'Log out'. 'Log out' is also an option from the main 'Desktop' menu item.