Sun's: 1280 X 1024 generally...to check for sure type xdpyinfo and scroll through the results.
Yes. Use xv& to display, crop and print the image as a postscript file.
Look in /usr/local/pub/ncs/graphics/OpenGL/ExamplesLab2. In each subdirectories there is a file called Makefile that you can download (DO NOT cut and paste as some of the white space NEEDS to be TABS!!!) that file to your directory. As long as your source is in a single file, this makefile will work for you, simply type
(assuming you've followed directions and named your file lab2.c!). If you have more than one source file, you'll need to add those file names into the makefile saying that they need to be compiled. For example, you might add a line that says:
And then change the last line in Makefile to say:
NOTE: The line above starts with a TAB!
Apparently not, from the questions I've received. I don't think it knows where to find all the includes and libraries you need. I've personally never used this program so I don't know what is supposed to be able to do and not supposed to be able to do.
There are two ways you can do this.
In file included from multiViewports.c:8:
/usr/local/glut/include/GL/glut.h:58: GL/gl.h: No such file or directory
/usr/local/glut/include/GL/glut.h:59: GL/glu.h: No such file or directory
*** Error code 1 make: Fatal error: Command failed for target `executable'
Do you know how to fix this?
I have seen this problem arise under two circumstances:
Well, you've stumped me here as I haven't had a chance, and won't anytime soon, to approach this issue. Some students have reported being able to use the C++ compiler simply by modifying the Makefile to use the C++ compiler and changing the extensions on my files to .C instead of .c. BUT, these files are still written in C, not C++.
I'll answer this question as soon as I can!
Yes, if you want all of the points. Check out the grade sheet.
Use the glClearColor procedure. This must occure BEFORE any calls to glClear(GL_COLOR_BUFFER_BIT).
Please see the documentation section on the course page http://www.cs.rit.edu/~ncs/Courses/570.shtml. There are links there to both the "OpenGL Programming Guide" and the "OpenGL Reference Manual", as well as the GLUT manual. You can find out more than you'll ever want to know ( :-) ) about the OpenGL commands in the Reference Manual.
Try the applet at http://www1.mmu.edu.my/~mukund/cogr/RGB.html. You can see the numbers for the red, green and blue values for the color that is displayed out of 255.
You might also want to look at /usr/openwin/lib/rgb.txt. This will provide a list of color names and the values to use for red, green and blue. (These values range from 0 to 255 for each color - Red, Green, Blue.)
glClear(GL_COLOR_BUFFER_BIT) does the trick.
It is likely that you've forgotten to precede your call to glOrtho or gluOrth2d with these lines:
We'll be looking at all of these transformations in the coming weeks and what's happening here will be clearer then. What is happening is the matrix representing your window is being multiplied in over and over again.
There is an example of drawWorld() in MultipleViewports in
In this case, all the drawWorld() does is draw a red or white square. (drawWorld() is display()) Your drawWorld() (and you could name it that) could contain the commands to draw ALL of the things in your world. Then, using
glMatrixMode (GL_PROJECTION);each time BEFORE calling drawWorld(), you can choose which of all the things you are drawing to actually display on the screen! (The rest are clipped away.)
gluOrtho2D(...); (OR glOrtho(...);)
glViewport is used to select WHERE to place what you've chosen from your world.
Yes, that is sufficient. The specifications indicate what I'd minimally like to see. The point of the multiple screens was to have you implement some mouse functionality.
There are a couple of things I can think of at this point to check:
The Makefile in any of the directories in my public area actually contain this information, the INCLUDE line tells us where all the include files are located and the LDFLAGS line tells us about the location of the libraries. In particular, glut.h is located in /usr/local/glut/include/GL and gl.h and glu.h are located in /usr/openwin/include/GL. The glut library is available in /usr/local/glut/lib/glut and the OpenGL libraries are in /usr/openwin/lib -L/. The X stuff is needed by GLUT.