Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

icetgldrawframe(3) [debian man page]

icetGLDrawFrame(3)						  IceT Reference						icetGLDrawFrame(3)

NAME
icetGLDrawFrame -- renders and composites a frame using OpenGL Synopsis #include <IceTGL.h> void icetGLDrawFrame( void ); Description Initiates a frame draw using the current OpenGL transformation matrices (modelview and projection). Before IceT may render an image, the tiled display needs to be defined (using icetAddTile), the drawing function needs to be set (using icetGLDrawCallback), and composite strategy must be set (using icetStrategy). The single image sub-strategy may also optionally be set (using icetSingleImageStrategy). All processes in the current IceT context must call icetGLDrawFrame for it to complete. The OpenGL projection matrix and modelview matrix must be set using glLoadMatrix or a number of other functions. Likewise, the OpenGL back- ground color must be set with glClearColor. IceT will use the matrices to determine what pixels need to be rendered and composited. IceT will also modify the projection matrix to project onto (or in between) tiles. If ICET_GL_DISPLAY is enabled, then the fully composited image is written back to the OpenGL framebuffer for display. It is the applica- tion's responsibility to synchronize the processes and swap front and back buffers. If the OpenGL background color is set to something other than black, ICET_GL_DISPLAY_COLORED_BACKGROUND should also be enabled. Displaying with ICET_GL_DISPLAY_COLORED_BACKGROUND disabled may be slightly faster (depending on graphics hardware) but can result in black rectangles in the background. If ICET_GL_DISPLAY_INFLATE is enabled and the size of the renderable window (determined by the current OpenGL viewport) is greater than that of the tile being displayed, then the image will first be ``inflated'' to the size of the actual display. This inflation will be assisted by texture hardware if ICET_GL_DISPLAY_INFLATE_WITH_HARDWARE is on. If ICET_GL_DISPLAY_INFLATE is disabled, the image is drawn at its original resolution at the lower left corner of the display. The image remaining in the frame buffer is undefined if ICET_GL_DISPLAY is disabled or the process is not displaying a tile. Errors ICET_INVALID_OPERATION Raised if the drawing callback has not been set. Also can be raised if icetDrawFrame is called recursively, probably from within the drawing callback. ICET_OUT_OF_MEMORY Not enough memory left to hold intermittent frame buffers and other temporary data. icetGLDrawFrame may also indirectly raise an error if there is an issue with the strategy or callback. Warnings None. Bugs If compositing with color blending on, the image returned may have a black background instead of the background_color requested. This can be corrected by blending the returned image over the desired background. This will be done for you if the ICET_CORRECT_COLORED_BACKGROUND is on. Copyright Copyright (C)2003 Sandia Corporation Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This source code is released under the New BSD License. See Also icetAddTile(3), icetBoundingBox(3), icetBoundingVertices(3), icetDrawFrame(3), icetGLDrawCallback(3), icetSingleImageStrategy(3), icetStrategy(3) IceT Reference September 20, 2010 icetGLDrawFrame(3)

Check Out this Related Man Page

icetDrawCallback(3)						  IceT Reference					       icetDrawCallback(3)

NAME
icetDrawCallback -- set a callback for drawing. Synopsis void icetDrawCallback( IceTDrawCallbackType callback ); Description The icetDrawCallback function sets a callback that is used to draw the geometry from a given viewpoint. If you are using OpenGL ,you should probably use the icetGLDrawCallback function and associated icetGLDrawFrame. These alternative functions automatically set up the OpenGL state and retreive OpenGL buffers. callback should be a function that renders an image of the local geometry based on the provided transformation matrices and background color. IceT will call callback during a call to icetDrawFrame to create the images for compositing. callback will be called a minimum amount of times. It may be called once. If none of the geometry projects on the display, it may not be called at all. If rendering to a tiled display and the geometry projects on multiple tiles, it may be called many times. The code in callback should be prepared to be called an unpredictable amount of times. For example, it should not attept to increment a frame counter and it should leave the rendering system's state such that another view to the geometry may be rendered. callback takes two projection matrices: projection_matrix and modelview_matrix. Each of these arguments is a 16-value array that repre- sents a $4 *4$ transformation of homogeneous coordinates. The arrays store the matrices in .igcolumn-major ordercolumn-major order. Note that the projection_matrix passed to callback is liable to be different than that passed to icetDrawFrame. Make certain that callback uses the modified projection_matrix passed to it. modelview_matrix is the same as that passed to icetDrawFrame, but also passed along for convienient reference. Any pixel that does not have geometry rendered to it should be set to the background_color passed to callback. Likewise, any transparent geometry should be blended against the background_color. Note that the background_color passed to callback is liable to be different than that passed to icetDrawFrame. callback is given result, an image object allocated to the size of the physical render size (see icetPhysicalRenderSize). The dimensions of the image can be queried with icetImageGetWidth and icetImageGetHeight. Pixels can be put in result by getting the color and/or depth buffers using the icetImageGetColor and icetImageGetDepth functions. Anything written to these buffers is captured in the image object. IceT passes callback an image sized to the physical render space to make indexing into it clearer and safer and to possibly render directly into the image buffers. That said, IceT might only be interested in a subregion of the data. To make your callback more efficient, IceT provides readback_viewport to specify the region of the image it will read. readback_viewport has four values. The first two values spec- ify the x and y pixel location of the lower left corner of the region of interest. The last two values specify the width and height of the region of interest. The callback only has to write valid pixels for this region of the image. It is not an error to write values outside this region, but they will be completely ignored. The callback function pointer is placed in the ICET_DRAW_FUNCTION state variable. Errors None. Warnings None. Bugs None known. Notes callback is tightly coupled with the bounds set with icetBoundingVertices or icetBoundingBox. If the geometry drawn by callback is dynamic (changes from frame to frame), then the bounds may need to be changed as well. Incorrect bounds may cause the geometry to be culled in sur- prising ways. Copyright Copyright (C)2003 Sandia Corporation Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This source code is released under the New BSD License. See Also icetBoundingBox(3), icetBoundingVertices(3), icetDrawFrame(3), icetPhysicalRenderSize(3) IceT Reference August 23, 2010 icetDrawCallback(3)
Man Page