Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

166 lines
6.2 KiB

  1. Name
  2. HP_convolution_border_modes
  3. Name Strings
  4. GL_HP_convolution_border_modes
  5. Version
  6. $Date: 1995/09/09 10:13:00 $ $Revision: 1.2 $
  7. Number
  8. 67
  9. Dependencies
  10. EXT_convolution is required
  11. Overview
  12. This extension provides some additional border modes for the
  13. EXT_convolution extension.
  14. New Procedures and Functions
  15. None
  16. New Tokens
  17. Accepted by the <param> parameter of ConvolutionParameteriEXT,
  18. and ConvolutionParameterfEXT, and by the <params> parameter of
  19. ConvolutionParameterivEXT and ConvolutionParameterfvEXT, when the
  20. <pname> parameter is CONVOLUTION_BORDER_MODE_EXT:
  21. IGNORE_BORDER_HP
  22. CONSTANT_BORDER_HP
  23. WRAP_BORDER_HP
  24. Accepted by the <pname> parameter of ConvolutionParameterivEXT,
  25. ConvolutionParameterfvEXT, GetConvolutionParameterivEXT, and
  26. GetConvolutionParameterfvEXT:
  27. CONVOLUTION_BORDER_COLOR_HP
  28. Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
  29. None
  30. Additions to Chapter 3 of the 1.0 Specification (Rasterization)
  31. The description of the convolution border mode is replaced with
  32. the following:
  33. The convolution border mode for a specific convolution filter is
  34. specified using ConvolutionParameteriEXT with the <target>
  35. parameter set to the name of the filter, the <pname> parameter
  36. set to CONVOLUTION_BORDER_MODE_EXT, and <param> set to one of
  37. REDUCE_EXT, IGNORE_BORDER_HP, CONSTANT_BORDER_HP, or
  38. WRAP_BORDER_HP.
  39. The width and height of source images convolved with border mode
  40. REDUCE_EXT are reduced by Wf-1 and Hf-1, respectively. If this
  41. reduction would generate a resulting image with zero or negative
  42. width and/or height, the output is simply null, with no error
  43. generated. The coordinates of the image that results from a
  44. convolution with border mode REDUCE_EXT are zero through Ws-Wf
  45. in width, and zero through Hs-Hf in height. In cases where
  46. errors can result from the specification of invalid image
  47. dimensions, it is these resulting dimensions that are tested,
  48. not the dimensions of the source image. (A specific example is
  49. TexImage1D and TexImage2D, which specify constraints for image
  50. dimensions. Even if TexImage1D or TexImage2D is called with a
  51. null pixel pointer, the dimensions of the resulting texture image
  52. are those that would result from the convolution of the specified
  53. image.)
  54. For the remaining border modes, we define Cw = floor(Wf / 2)
  55. and Ch = floor(Hf / 2). The coordinates (Cw, Ch) define the
  56. center of the convolution filter.
  57. If the convolution border mode is IGNORE_BORDER_HP, the output
  58. image has the same dimensions as the source image. The convolution
  59. filter is moved around the source image so that its center passes
  60. over every pixel in the source image. At each location, the sum of
  61. products is computed and the result is written in the destination
  62. image at the location that corresponds to the pixel location where
  63. the convolution filter is centered. However, the sum of products
  64. is not computed for any pixel where the convolution filter extends
  65. beyond one of the edges of the source image. Instead, for these
  66. locations, the pixel value from the source image is copied to
  67. the destination image.
  68. The convolution border mode CONSTANT_BORDER_HP is identical to
  69. IGNORE_BORDER_HP except that for each pixel where the convolution
  70. filter extends beyond one of the edges of the source image, a value
  71. equal to the current border color will be used as the value for
  72. the source image. The current convolution border color is set by
  73. calling ConvolutionParameterivEXT or ConvolutionParameterfvEXT with
  74. <pname> set to CONVOLUTION_BORDER_COLOR_HP and <params> containing
  75. four values that comprise the RGBA color to be used as the image
  76. border. Integer color components are interpreted linearly such that
  77. the most positive integer maps to 1.0, and the most negative integer
  78. maps to -1.0. Floating point color components are clamped to the
  79. range [0,1] when they are specified.
  80. If the convolution border mode is WRAP_BORDER_HP, the output image
  81. has the same dimensions as the source image, and the source image is
  82. assumed to be continuously wrapped in both x and y directions.
  83. Therefore, source image pixels in the Cw columns on the right edge
  84. are used in the convolution computation for the Cw columns on the
  85. right edge of the image, and vice versa. Similarly, source image
  86. pixels in the Ch rows on the top of the image are used in the
  87. convolution computation for the Ch rows on the bottom of the
  88. image and vice versa.
  89. Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
  90. and the Frame buffer)
  91. None
  92. Additions to Chapter 5 of the 1.0 Specification (Special Functions)
  93. None
  94. Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
  95. None
  96. Dependencies on EXT_convolution
  97. EXT_convolution is required. This extension adds capability to
  98. the convolution operations defined in that extension.
  99. Errors
  100. INVALID_ENUM is generated if ConvolutionParameterivEXT or
  101. ConvolutionParameterfvEXT parameter <pname> is not
  102. CONVOLUTION_FILTER_SCALE_EXT, CONVOLUTION_FILTER_BIAS_EXT,
  103. CONVOLUTION_BORDER_MODE_EXT, or CONVOLUTION_BORDER_COLOR_HP.
  104. INVALID_ENUM is generated if ConvolutionParameteriEXT,
  105. ConvolutionParameterfEXT, ConvolutionParameterivEXT, or
  106. ConvolutionParameterfvEXT parameter <pname> is
  107. CONVOLUTION_BORDER_MODE_EXT and parameter <params> is
  108. not one of REDUCE_EXT, IGNORE_BORDER_HP, CONSTANT_BORDER_HP,
  109. or WRAP_BORDER_HP.
  110. INVALID_ENUM is generated if GetConvolutionParameterivEXT or
  111. GetConvolutionParameterfvEXT parameter <pname> is not
  112. CONVOLUTION_FILTER_SCALE_EXT, CONVOLUTION_FILTER_BIAS_EXT,
  113. CONVOLUTION_BORDER_MODE_EXT, CONVOLUTION_FORMAT_EXT,
  114. CONVOLUTION_WIDTH_EXT, CONVOLUTION_HEIGHT_EXT,
  115. MAX_CONVOLUTION_WIDTH_EXT, MAX_CONVOLUTION_HEIGHT_EXT,
  116. or CONVOLUTION_BORDER_COLOR_HP.
  117. New State
  118. Initial
  119. Get Value Get Command Type Value Attrib
  120. --------- ----------- ---- ------- ------
  121. CONVOLUTION_BORDER_COLOR_HP GetConvolutionParameterfvHP C (0,0,0,0) pixel
  122. New Implementation Dependent State
  123. None