WPI Computer Science Department

Computer Science Department
------------------------------------------

CS 4731 B Term, 2011
Computer Graphics Course
Frequently Asked Questions (FAQ)


Notes and Disclaimer

The following FAQ entries were scraped off actual student postings from the the CS 4731 class. It is anticipated that students will tend to have the same problems over and over and this FAQ will help answer some of the issues that come up year over year. Where possible, I have kept the actual names of the students who posted to the message board, purely to give them credit. If your name appears and you would like me to take your name or your post off, please send me email. Also, the FAQ is provided purely to help. I haven't verified the accuracy of the suggestions, so please use at your own risk

The FAQ

Getting Started in OpenGL Issues

Problems on CCC Machines

Problems with book code, questions, Typos and Omissions from Textbook

C/C++ Questions

Getting Started in OpenGL Issues

==============================CUT ===========================================

Question: If I want to use Cygwin to do my CS 4731 Projects, what do I do?

Answer:

Warning: the following is not for the faint of heart. Cygwin 
is ridiculously useful when it works, but almost always 
requires tweaking, and that tweaking requires low-level 
knowledge of both the Windows and *nix environments. If 
you're not very comfortable with all of the technologies 
involved, I would recommend trying XWin first.

If you're having problems with xwin, it is possible to 
install XFree86 on Windows using the Cygwin installer. When 
setting it up, make sure that at least the 'Default' component 
set of XFree86 is being installed, as well as OpenSSH (under 
the Net category.)

The attached batch file assumes that you installed cygwin to 
\cygwin. You may want to overwrite your 
\cygwin\usr\X11R6\bin\startxwin.bat with this file as well.

It will start a 'transparent' X session so that X windows 
will act as regular Microsoft windows (no pun intended, I 
swear).

If you installed OpenSSH with Cygwin, you can now run

ssh -X -C user@cpu.wpi.edu

and X11 forwarding and compression will be enabled. You can 
rename the attached batch file and tack that line on to the 
end and have it proceed automatically.

If it's working, the X logo will be displayed in the system 
tray. Right-click to display the root window (you should not 
have to do this except if you want to run a different window 
manager) or to exit.

As a side note, you can modify that batch file to display all 
X windows as children of a root window, or to use a different 
window manager (such as twm) than Windows. The advantage of 
those methods would be easier differentiation between Microsoft 
windows and X windows.

With offcampus 600kbit DSL and no compression, I pull one frame 
every 21 seconds. With compression, I pull one frame every five 
seconds. Either way, utterly masochistic for anything other than 
final debugging, especially because OpenGL that compiles and links 
on one platform should be identical to OpenGL compiled and linked 
on another platform (well, at this level of OpenGL anyways ;). If 
you enjoy pain, try running XEmacs at that level ;)

Alexander Lash
chaos@wpi.edu

=============CUT =================================================

Question: How do I use Microsoft .NET for the CS 4731 projects?

Answer:

GLUT/OpenGL problems:

Here's a tip from Paul Tessier (grad student)
for anyone using Visual Studio .Net

This might be helpful to anyone use visual studio. 
WPI currently provide the .Net edit of visual studio 
and as such, when compiling you receive an error about
redefining exit. It might be helpful to include 
these instuctions in the current help page.

http://students.cs.tamu.edu/jwf4661/441/glut_NET.html

================================= CUT ============================


Question: I am still having problems getting Visual Studio .NET to compile

Answer:

.NET problems: 

Are you having difficulty installing the GLUT libraries? 
VS .Net keeps the libraries in a different location. If 
you put the GLu and GLUT headers/libraries into the VC 6.0 
location, you probably won't get it to compile.

If you are using VS .Net make sure to put the files in:
\Vc7\PlatformSDK\[include\GL,lib]

- Paolo Piselli (TA)

================================= CUT ======================================


Question: How can I work from home using text-based SSH and XWindows?

Answer:

In case you want to use a text-based SSH client outside of 
WPI for speed, but still want to confirm your pictures look 
ok, visit http://www.cs.umn.edu/help/offsite/graphical.php. 
This will tell you how to get xwin (available free from WPI) 
to open and display whenever a graphic is sent from SSH.







================================= CUT ======================================

Question: Is there any help for using DevShed to develop OpenGL programs?

Answer:

Hey guys,
I was finally able to get DevShed to work. Follow the instructions on this site and you'll be all set.
http://www.cs.auckland.ac.nz/~jli023/c/bloodshed.htm


-- Greg Ratner

Problems on CCC Machines


==================== CUT======================================================

Question: The rand( ) function on the CCC machines is not working

Answer:

rand() not working on CCC machines:

From Brian Corcoran:

Both rand() and random() are in stdlib.h on the CCC machines:


#include 

should work.


Type 'man rand' or 'man random' for more info.

And from Steven Gogos:

try #include [cmath]

also, you may have to wrap it in a #ifndef WIN32 so you do not get 
truncation warnings with msvc++ on your machine

Questions, Problems with book code or Typos and Omissions from Textbook



===========================CUT====================================================

Question: Problems compiling book code under linux or program complains of glGenVertexArrays
under Linux 

Answer:


The starter code (as well as many of the examples
from in your textbook) actually use OpenGL 3.2. Under
linux GLEW segfaults with 3.2 when call glGenVertexArrays,
the vertex array objects are not supported. There are
three fixes for this:

a. the first is switch to OpenGL 3.1. VAOs apparently only
   work with GLEW for OpenGL 3.1.

b. The second fix is to put

    glewExperimental = GL_TRUE;

    before the call to glewInit();

c. The third is to use glext instead of GLEW.

Option (b) seems to be the easiest. In some extreme cases,
you may have to try all three options.

Enjoy!

Emmanuel

===========================CUT====================================================





C/C++ Questions


========================CUT ===============================================


Question: What's the ascii value of the escape character?

Answer:

Finding out the escape character:

From Vince Bullinger:

Using this little (18 lines) program I wrote - it's attached - you can 
test values of almost all characters. Escape is 27.


[Feedback] [Search Our Web] [Help & Index]

[Return to the WPI Homepage] [Return to CS Homepage]

mailto:webmaster@cs.wpi.edu