================================================================================ Final Project : Video Room Overview =============================================================================== This file contains a summary of how each special surface is created. The Floor: The floor is an array of glquads, every corner containing a normal pointing in the i direction. The array is drawn in scan lines, that is, a strip is laid, then the next strip, etc. etc. Every four quads, the material color applied is perturbed by a small amount creating a wood floor effect. The shiny effect is maintained by leaving the specular values the same for all quads. The ceiling: The ceiling is built like the floor, except with uniform color across the ceiling and an alpha value of 0.3 and the normals are in the negative i direction. Note that the ceiling is built last as in the painters algorithm so that the system will know what's underneath before doing the blending. The walls: The walls are built as an array of glquads, every corner contains a normal point pointing inwards towards the room except perturbed slightly up and sideways relative to the wall to create a texture effect. The Video Panels: Each video panel is created with a black border around a center quad. The center quad has a texture mapped onto it. This texture receives data from an MJPEG decoder module. A URL is given to the module, it receives and decodes the jpeg using the Intel JPEG Library in a separate thread. After decoding, it copies the texture back into the specified texture and calls glutPostDisplay. Since using mipmapping yielded extremely slow results, static texture maps are used. Static maps are always square. To fit a non-square arbitrary mjpeg stream onto the video panel, a texture of the next larger resolution above the resolution of the mjpeg is created, then the image is copied into that large opengl memory buffer. Upon drawing, only the picture section is mapped onto the display panel, i. e. the glTextureCoords end up going from 0 to image height / texture resolution and image width / texture resolution. The end result is pleasing. The specular highlights off the floor are cool looking, and the videos work. -------------- Key Action -------------- Arrows Navigation (Like Doom; etc.) Click mouse button When mouse is moved, rotate about current location w Toggle Wireframe Mode 1,2,3 Toggle light 1, 2, and 3 s Toggle flat vs gouraud Shading Mode h Toggle localized vs. lights at infinity q,Q move up and down, note the ceiling is transparent c Toggle Back Culling a,z look up, look down r,R increase, decrease rotation speed escape Quit