[artoolkit-commits] artoolkit/include/AR gsub_lite.h,1.7,1.8
Optical marker tracking and overlay for augmented reality.
Brought to you by:
philip_lamb
From: Philip L. <phi...@us...> - 2006-04-06 05:33:36
|
Update of /cvsroot/artoolkit/artoolkit/include/AR In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3960 Modified Files: gsub_lite.h Log Message: Moved some gsub_lite globals into state structure. Index: gsub_lite.h =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/include/AR/gsub_lite.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gsub_lite.h 5 Apr 2006 05:48:43 -0000 1.7 --- gsub_lite.h 6 Apr 2006 05:33:32 -0000 1.8 *************** *** 19,22 **** --- 19,23 ---- * 2.7.9 2005-08-15 PRL Added complete support for runtime selection of pixel format and rectangle/power-of-2 textures. * 2.8.0 2006-04-04 PRL Move pixel format constants into toolkit global namespace (in config.h). + * 2.8.1 2006-04-06 PRL Move arglDrawMode, arglTexmapMode, arglTexRectangle out of global variables. * */ *************** *** 176,237 **** // ============================================================================ - // It'd be nicer if these were wrapped in accessor functions. - - /*! - @var arglDrawMode - @abstract Determines display method by which arglDispImage() transfers pixels. - @discussion - The value of this variable determines the method by which - arglDispImage transfers pixels of an image to the display. Setting this - variable to a value of AR_DRAW_BY_GL_DRAW_PIXELS specifies the use of OpenGL - DrawPixels to do the transfer. Setting this variable to a value of - AR_DRAW_BY_TEXTURE_MAPPING specifies the use of OpenGL TexImage2D to do the - transfer. The DrawPixels method is guaranteed to be available on all - implementations, but arglDispImage does not correct the image - for camera lens distortion under this method. In contrast, TexImage2D is only - available on some implementations, but allows arglDispImage() to apply a correction - for camera lens distortion, and additionally offers greater potential for - accelerated drawing on some implementations. - - The initial value is defined to the value of the symbolic constant DEFAULT_DRAW_MODE - (defined in <AR/config.h>). - @availability First appeared in ARToolKit 2.68. - */ - extern int arglDrawMode; - - /*! - @var arglTexmapMode - @abstract Determines use of full or half-resolution TexImage2D pixel-transfer in arglDispImage(). - @discussion - When arglDrawMode is set to AR_DRAW_BY_TEXTURE_MAPPING, the value of this variable - determines whether full or half-resolution data is transferred to the - texture. A value of AR_DRAW_TEXTURE_FULL_IMAGE uses all available pixels in the - source image data. A value of AR_DRAW_TEXTURE_HALF_IMAGE discards every second row - in the source image data, defining a half-height texture which is then drawn stretched - vertically to double its height. - - The latter method is well-suited to drawing interlaced images, as would be obtained - from DV camera sources in interlaced mode or composite video sources. - @availability First appeared in ARToolKit 2.68. - */ - extern int arglTexmapMode; - - /*! - @var arglTexRectangle - @abstract Determines use of rectangular TexImage2D pixel-transfer in arglDispImage(). - @discussion - On implementations which support the OpenGL extension for rectangular textures (of - non power-of-two size), and when arglDrawMode is set to AR_DRAW_BY_TEXTURE_MAPPING, - the value of this variable determines whether rectangular textures or ordinary - (power-of-two) textures are used by arglDispImage(). A value of TRUE specifies the - use of rectangluar textures. A value of FALSE specifies the use of ordinary textures. - - If the OpenGL driver available at runtime does not support for rectangular textures, - changing the value of this variable to TRUE will result calls to arglDispImage - performing no drawing. - @availability First appeared in ARToolKit 2.68. - */ - extern int arglTexRectangle; - #if defined(__APPLE__) && defined(APPLE_TEXTURE_FAST_TRANSFER) extern int arglAppleClientStorage; --- 177,180 ---- *************** *** 239,247 **** extern GLuint arglAppleTextureRangeStorageHint; #endif // __APPLE__ && APPLE_TEXTURE_FAST_TRANSFER ! // ============================================================================ // Public functions. // ============================================================================ ! /*! @function arglSetupForCurrentContext --- 182,190 ---- extern GLuint arglAppleTextureRangeStorageHint; #endif // __APPLE__ && APPLE_TEXTURE_FAST_TRANSFER ! // ============================================================================ // Public functions. // ============================================================================ ! /*! @function arglSetupForCurrentContext *************** *** 459,463 **** context, as returned by arglSetupForCurrentContext() for this context. @param format A symbolic constant for the pixel format being set. See ! @link ARGL_PIX_FORMAT ARGL_PIX_FORMAT @/link for a list of all possible formats. @result TRUE if the pixel format value was set, FALSE if an error occurred. @availability First appeared in ARToolKit 2.71. --- 402,406 ---- context, as returned by arglSetupForCurrentContext() for this context. @param format A symbolic constant for the pixel format being set. See ! @link AR_PIXEL_FORMAT AR_PIXEL_FORMAT @/link for a list of all possible formats. @result TRUE if the pixel format value was set, FALSE if an error occurred. @availability First appeared in ARToolKit 2.71. *************** *** 474,478 **** context, as returned by arglSetupForCurrentContext() for this context. @param format A symbolic constant for the pixel format in use. See ! @link ARGL_PIX_FORMAT ARGL_PIX_FORMAT @/link for a list of all possible formats. @param size The number of bytes of memory occupied per pixel, for the given format. @result TRUE if the pixel format and size values were retreived, FALSE if an error occurred. --- 417,421 ---- context, as returned by arglSetupForCurrentContext() for this context. @param format A symbolic constant for the pixel format in use. See ! @link AR_PIXEL_FORMAT AR_PIXEL_FORMAT @/link for a list of all possible formats. @param size The number of bytes of memory occupied per pixel, for the given format. @result TRUE if the pixel format and size values were retreived, FALSE if an error occurred. *************** *** 481,484 **** --- 424,487 ---- int arglPixelFormatGet(ARGL_CONTEXT_SETTINGS_REF contextSettings, AR_PIXEL_FORMAT *format, int *size); + /*! + @function + @abstract Set method by which arglDispImage() transfers pixels. + @discussion + The value of this setting determines the method by which + arglDispImage transfers pixels of an image to the display. Setting this + variable to a value of AR_DRAW_BY_GL_DRAW_PIXELS specifies the use of OpenGL + DrawPixels to do the transfer. Setting this variable to a value of + AR_DRAW_BY_TEXTURE_MAPPING specifies the use of OpenGL TexImage2D to do the + transfer. The DrawPixels method is guaranteed to be available on all + implementations, but arglDispImage does not correct the image + for camera lens distortion under this method. In contrast, TexImage2D is only + available on some implementations, but allows arglDispImage() to apply a correction + for camera lens distortion, and additionally offers greater potential for + accelerated drawing on some implementations. + + The initial value is AR_DRAW_BY_TEXTURE_MAPPING. + @availability First appeared in ARToolKit 2.68. + */ + void arglDrawModeSet(ARGL_CONTEXT_SETTINGS_REF contextSettings, const int mode); + int arglDrawModeGet(ARGL_CONTEXT_SETTINGS_REF contextSettings); + + /*! + @function + @abstract Determines use of full or half-resolution TexImage2D pixel-transfer in arglDispImage(). + @discussion + When arglDrawModeSet(AR_DRAW_BY_TEXTURE_MAPPING) has been called, the value of this setting + determines whether full or half-resolution data is transferred to the + texture. A value of AR_DRAW_TEXTURE_FULL_IMAGE uses all available pixels in the + source image data. A value of AR_DRAW_TEXTURE_HALF_IMAGE discards every second row + in the source image data, defining a half-height texture which is then drawn stretched + vertically to double its height. + + The latter method is well-suited to drawing interlaced images, as would be obtained + from DV camera sources in interlaced mode or composite video sources. + + The initial value is AR_DRAW_TEXTURE_FULL_IMAGE. + @availability First appeared in ARToolKit 2.68. + */ + void arglTexmapModeSet(ARGL_CONTEXT_SETTINGS_REF contextSettings, const int mode); + int arglTexmapModeGet(ARGL_CONTEXT_SETTINGS_REF contextSettings); + + /*! + @function + @abstract Determines use of rectangular TexImage2D pixel-transfer in arglDispImage(). + @discussion + On implementations which support the OpenGL extension for rectangular textures (of + non power-of-two size), and when arglDrawMode is set to AR_DRAW_BY_TEXTURE_MAPPING, + the value of this variable determines whether rectangular textures or ordinary + (power-of-two) textures are used by arglDispImage(). A value of TRUE specifies the + use of rectangluar textures. A value of FALSE specifies the use of ordinary textures. + + If the OpenGL driver available at runtime does not support for rectangular textures, + changing the value of this variable to TRUE will result calls to arglDispImage + performing no drawing. + @availability First appeared in ARToolKit 2.68. + */ + void arglTexRectangleSet(ARGL_CONTEXT_SETTINGS_REF contextSettings, const int state); + int arglTexRectangleGet(ARGL_CONTEXT_SETTINGS_REF contextSettings); + #ifdef __cplusplus } |