Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

icetgldrawcallback(3) [debian man page]

icetGLDrawCallback(3)						  IceT Reference					     icetGLDrawCallback(3)

NAME
icetGLDrawCallback -- set a callback for drawing with OpenGL . Synopsis #include <IceTGL.h> typedef void (* IceTGLDrawCallbackType)( void ); void icetGLDrawCallback( IceTGLDrawCallbackType callback ); Description The icetGLDrawCallback function sets a callback that is used to draw the geometry from a given viewpoint. It will be implicitly called from within icetGLDrawFrame. callback should be a function that issues appropriate OpenGL calls to draw geometry in the current OpenGL context. After callback is called, the image left in the frame buffer specified by icetGLSetReadBuffer will be read back for compositing. callback should not modify the GL_PROJECTION_MATRIX as this would cause IceT to place image data in the wrong location in the tiled display and improperly cull geometry. It is acceptable to add transformations to GL_MODELVIEW_MATRIX, but the bounding vertices given with icetBoundingVertices or icetBoundingBox are assumed to already be transformed by any such changes to the modelview matrix. Also, GL_MOD- ELVIEW_MATRIX must be restored before the draw function returns. Therefore, any changes to GL_MODELVIEW_MATRIX are to be done with care and should be surrounded by a pair of glPushMatrix and glPopMatrix functions. It is also important that callback not attempt the change the clear color. In some composting modes, IceT needs to read, modify, and change the background color. These operations will be lost if callback changes the background color, and severe color blending artifacts may result. IceT may call callback several times from within a call to icetGLDrawFrame or not at all if the current bounds lie outside the current viewpoint. This can have a subtle but important impact on the behavior of callback. For example, counting frames by incrementing a frame counter in callback is obviously wrong (although you could count how many times a render occurs). callback should also leave OpenGL in a state such that it will be correct for a subsequent run of callback. Any matrices or attributes pushed in callback should be popped before callback returns, and any state that is assumed to be true on entrance to callback should also be true on return. The callback function pointer is placed in the ICET_GL_DRAW_FUNCTION state variable. icetGLDrawCallback is similar to icetDrawCallback. The difference is that the callback set by icetGLDrawCallback is used by icetGL- DrawFrame and the callback set by icetDrawCallback is used by icetDrawFrame. Errors ICET_INVALID_OPERATION Raised if the icetGLInitialize has not been called. 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), icetDrawCallback(3), icetGLDrawFrame(3) IceT Reference August 9, 2010 icetGLDrawCallback(3)

Check Out this Related 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)
Man Page