The Roam binary included on v6.1 of the Developer Toolbox was
generated on an IRIX 6.2 Indigo² Impact system.
In order to recompile you must install the GLUT 3.0 software,
included on this v6.1 Toolbox, onto your own system.
The inst images or tardist file can be found in
toolbox/src/exampleCode/opengl/GLUT/inst
README file from "src" directory
/* Author : Patrick Bouchaud galaad@neu.sgi.com */ PURPOSE: ======== To match the physical dimensions of advertising posters, it is common for a Desktop Publishing image to exceed 10,000x10,000 pixels (RGBA). IMPACT's Memory-To-Graphics high download rate enables the hardware acceleration of a variety of applications , which all need to tile their data. Similar to the Volume Rendering and Terrain Following techniques, the image is drawn - and processed - on a per-tile basis. The new tiles are loaded from memory as needed, and then used as textures for Rotation, interpolated Zoom, and real-time Convolution. AUTHORS's ticks : ================ I use 4-space tabulations (sorry for the printing) My Makefile first creates a .ofiles directory, where all the .o files go, and where the actual executable $(TARGET).EXE is generated. A $(TARGET) link is then created from the current directory to the executable. Libraries : =========== These Examples use P.Haeberli's libimage.a, and M.Kilgard's libglut.a. I assume these files are located under /usr/lib, and the image.h header can be found under /usr/include/gl, whereas the glut.h file should be under /usr/include/GL. COMPILER's DIRECTIVES: ====================== -DDB : double-buffering -DSUBTEX: instead of tiling the texture into N texture objects, we use glTexSubImage2DEXT() to only update the sub-tiles of a unique [ 2D_TEXTURE_MAX_WIDTH x 2D_TEXTURE_MAX_HEIGHT ] texture OPENGL EXTENSIONS: ================== CODE ARCHITECTURE : =================== The code implements the basic following algorithm (see Redraw()) : We use a cache of NUM_S_TILES x NUM_T_TILES texture objects, which compose the total currently visible portion of the image NOTE that because we enable rotation and translation, the actual total number of pixels displayable from our cache at any time is : (NUM_S_TILES-1)x(NUM_T_TILES-1)xTILE_S_SIZExTILE_T_SIZE / SQR(2) To update the cache, we first check whether the tiles have gone out-of-view : this is the purpose of the checkTiles() routine. We limit the translation step to never exceed the TILE size; therefore we know that at most ONE band of tiles in each dimension will have to be reloaded before this frame's rendering. MARK_TILES() mark the currently out-of-view tiles, which then have to be replaced by newly incoming tiles. the purpose of the MARK_TILES() routine is to set the isObsolete[] flag for such tiles, while setting the xtile[] and ytile[] associated variables to the incoming tiles coordinates. Let's take an example : ----------------------- if we translate in the right direction, so that the left-most tiles column gets out-of-view, we then have to replace the left-most tiles column with the new right-most tiles column : for our RENDERING to be consistent with this tiling mechanism, we'll have to translate some "modulo-counter" forward, by one tile, and draw all NUM_S_TILES tiles from current "modulo-counter", using indexes%NUM_S_TILES. The sub-texturing approach is slightly different, in that the "modulo" is accomplished automatically by the GL_REPEAT texture wrapping mode. We just have to translate the "modulo-counter" back into the texture space, using glMatrixMode( GL_TEXTURE ), and here we go. The drawTiles() routine finally : .Sets the matrix transformations according to the current tiles origin .FIRST: draw all tiles resident in TRAM .THEN: restore all tiles non-resident in TRAM, if needed .FINALLY: load & draw newly marked tiles Before loading, we activate imaging operators such as Convolution to operate on the pixel transfer from CPU to TEXTURE memory.
Source
Documentation
Reference