<- previous index next ->
The purpose of this course is to provide the student both
knowledge and a basic Graphical User Interface, GUI, program
that the student has written and can be expanded into
various applications the student wants to develop.
Building GUI programs is non-trivial yet rewarding.
The student needs to understand the operating system,
the windowing system and "tool kits."
There are many potential employment opportunities for
graduates with computer graphics skills. The film
industry and advertising industry have many types of
positions available. The gaming industry, with some
firms local to the Baltimore area, have various
positions available. Check out Firaxis, Breakaway,
Day 1 Studios, Big Huge Games and others.
Course motto: If it works, use it.
If not, find another way.
You will be dealing with windowing systems and graphical
libraries that are much larger and more complex than
operating systems. I guarantee they will have bugs.
Your grade depends of finding a way around any bugs.
Your program must work in spite of system/library bugs.
The basic prerequisite for this course is to be able to
write working code in some reasonable programming language.
You will probably be writing 1,000 to 10,000 lines of code
in this course. Do not panic. A lot of code is repetitive.
You are expected to know the software development cycle:
Edit <-----------+
Compile |
Run |
Curse ---+
As an acknowledged expert, Edsger Dijkstra, has stated:
"Top down design and programming is right every time
except the first time." For your rapid learning you
do not want to use the "waterfall model" or even
Barry Boehms "spiral model", but rather use
"rapid prototyping".
Do not worry about the details, for a while, yet look over
the organization and structure of the same GUI application
written for X Windows Motif, OpenGL and Java.
You will need to make a choice of "platform" for doing
the programming for this course. My lectures will cover:
Microsoft Windows - OpenGL in C, C++ (same code for Linux and Mac OSX)
- Java (same code every where)
Linux, Unix - OpenGL in C, C++ (same code MS Windows)
- Java (same code every where)
- X Windows Motif (same code for Mac OSX)
Mac OSX - OpenGL in C, C++ (same code for MS Windows and Linux)
- Java (same code every where)
- X Windows Motif (same code for Linux, Unix)
On Microsoft Windows you need Windows XP and Microsoft
Visual Studio installed in order to use OpenGL.
(In past, buy from UMBC bookstore at very low price.
now may be download free or see instructor.))
You will need OpenGL Utility Toolkit, GLUT, also.
On Microsoft Windows you need Java 1.5 or later installed
(Download from internet.)
On Linux, Unix gnu compilers should be available. Install
OpenGL (called Mesa) if not already available.
You will need OpenGL Utility Toolkit, GLUT, also.
On Linux, Unix you need Java 1.5 or later installed.
On Linux, Unix you need Motif (called Lesstif or OpenMotif) installed.
(UMBC linux.gl.umbc.edu has all software installed with the
possible exception of GLUT. For your computer - download from
the internet.)
On Mac the underlying operating system is Unix. Thus you can
download X windows, OpenGL, GLUT, Motif and other software if
it is not already installed. You may also use the Mac IDE.
Java has two execution models. "Frame" makes standard applications
that run in a standard window on all platforms. "App" or applet is
much more restrictive and must run in a WEB browser or appletviewer.
GUI Human factors: Make sure it is obvious to the user of your
application how to quit, exit, kill or stop.
Just a quick look at some sample code.
See which will run on your development system
w1.c basic X windows
w1.jpg - screen
w1gl.c - w1.c in OpenGL
w1gl.jpg - screen
W1frame.java - w1.c in Java
W1frame.jpg - screen
W1app.java - W1frame as an applet
Note that:
w1.c, the basic X Windows GUI application can be compiled
and executed on all Unix based operating systems,
including MacOS X
w1gl.c, the OpenGL GUI application can be compiled
and executed on almost all operating systems
that provide windowing (All forms of Unix,
MacOS and Microsoft Windows, etc.)
W1frame.java, the Java GUI application can be compiled
and run on any system that has Java
J2SE 1.4.2 or later available.
W1app.java, the Java GUI application can be compiled
on any system that has Java J2SE 1.4.2 or
later available. Then run in almost any
WEB browser. But, the user may not have
Java applets enabled. There are also some
severe restrictions on applets.
Other demonstrations of sample applications may include:
split_cube - visualization, color, movement, inside
teapots - lighting
planets - lighting and glowing 1
sky_fly - terrain
pilot - do your own flight simulator
springgl - education
spring2gl - build on previous applications
alpha_fade - scene transitions using fading
earth - texture map pictures onto objects
gears4 - modeling
tenseggl - modeling user controls viewing
light_dat - skull, more modeling
draw - default object oriented graphics (digital logic added)
pairs2 - card game
hull_draw - modeling boat hull
mover - independent window control
fractal.c - create scenes (art vs composition)
fractalgl.c - create scenes (art vs composition)
Fractal.java - create scenes (art vs composition)
Now, you need to set up your system for GUI programming.
linux.gl.umbc.edu has everything for Linux X Windows,
OpenGL and java. You may have to download software or
set up links or change directory names on your Linux
or Unix system.
Microsoft Windows needs to have Microsoft Visual Studio to
be able to compile programs for OpenGL. There are many
versions of Microsoft Visual Studio and thus they are
not covered in this course. The essential component is
"cl.exe" the C and C++ compiler that can be used from
a standard command prompt. If you use Visual Studio
be sure you turn off preference "precompiled header files".
Mac OSX, use either the Mac IDE or download the X environment.
More information is in getting started
That said, here are the Linux/Unix/Mac "Makefile" and the
Microsoft Windows "make.bat" files that compile and execute
the source code shown above.
Makefile1.linux
Makefile_mac_w1
make1.bat
In my personal directory, I have some Makefiles and
some make.bat files that includes all commands to make
most programs in that directory.
A start of my Makefile and make.bat is shown above.
An option to make.bat is to use nmake on Microsoft Windows.
(This is an optional exercise for the student.)
Or, use an IDE such as Visual Studio, Eclipse, etc. etc.
<- previous index next ->