José Fonseca | 99771fc | 2010-11-25 20:32:59 +0000 | [diff] [blame] | 1 | ########################################################################## |
| 2 | # |
| 3 | # Copyright 2008-2009 VMware, Inc. |
| 4 | # All Rights Reserved. |
| 5 | # |
| 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | # of this software and associated documentation files (the "Software"), to deal |
| 8 | # in the Software without restriction, including without limitation the rights |
| 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | # copies of the Software, and to permit persons to whom the Software is |
| 11 | # furnished to do so, subject to the following conditions: |
| 12 | # |
| 13 | # The above copyright notice and this permission notice shall be included in |
| 14 | # all copies or substantial portions of the Software. |
| 15 | # |
| 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 22 | # THE SOFTWARE. |
| 23 | # |
| 24 | ##########################################################################/ |
| 25 | |
José Fonseca | 4a826ed | 2010-11-30 16:58:22 +0000 | [diff] [blame] | 26 | """GLX API description.""" |
| 27 | |
José Fonseca | 99771fc | 2010-11-25 20:32:59 +0000 | [diff] [blame] | 28 | |
| 29 | from stdapi import * |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 30 | from glapi import * |
José Fonseca | 99771fc | 2010-11-25 20:32:59 +0000 | [diff] [blame] | 31 | |
José Fonseca | e90885a | 2010-11-26 15:01:18 +0000 | [diff] [blame] | 32 | VisualID = Alias("VisualID", UInt32) |
José Fonseca | e90885a | 2010-11-26 15:01:18 +0000 | [diff] [blame] | 33 | Display = Opaque("Display *") |
| 34 | Visual = Opaque("Visual *") |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 35 | Font = Alias("Font", UInt32) |
| 36 | Pixmap = Alias("Pixmap", UInt32) |
| 37 | Window = Alias("Window", UInt32) |
José Fonseca | 917329e | 2011-10-19 17:28:49 +0200 | [diff] [blame] | 38 | Colormap = Alias("Colormap", UInt32) |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 39 | |
| 40 | GLXContext = Opaque("GLXContext") |
| 41 | GLXPixmap = Alias("GLXPixmap", UInt32) |
| 42 | GLXDrawable = Alias("GLXDrawable", UInt32) |
| 43 | GLXFBConfig = Opaque("GLXFBConfig") |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 44 | GLXFBConfigSGIX = Opaque("GLXFBConfigSGIX") |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 45 | GLXFBConfigID = Alias("GLXFBConfigID", UInt32) |
| 46 | GLXContextID = Alias("GLXContextID", UInt32) |
| 47 | GLXWindow = Alias("GLXWindow", UInt32) |
| 48 | GLXPbuffer = Alias("GLXPbuffer", UInt32) |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 49 | GLXPbufferSGIX = Alias("GLXPbufferSGIX", UInt32) |
| 50 | GLXVideoSourceSGIX = Alias("GLXVideoSourceSGIX", UInt32) |
José Fonseca | 7e367f5 | 2013-07-08 18:15:53 +0100 | [diff] [blame] | 51 | GLXVideoDeviceNV = Alias("GLXVideoDeviceNV", UInt32) |
| 52 | GLXVideoCaptureDeviceNV = Alias("GLXVideoCaptureDeviceNV", UInt32) |
José Fonseca | e90885a | 2010-11-26 15:01:18 +0000 | [diff] [blame] | 53 | |
| 54 | XVisualInfo = Struct("XVisualInfo", [ |
| 55 | (Visual, "visual"), |
| 56 | (VisualID, "visualid"), |
| 57 | (Int, "screen"), |
| 58 | (Int, "depth"), |
| 59 | (Int, "c_class"), |
| 60 | (ULong, "red_mask"), |
| 61 | (ULong, "green_mask"), |
| 62 | (ULong, "blue_mask"), |
| 63 | (Int, "colormap_size"), |
| 64 | (Int, "bits_per_rgb"), |
| 65 | ]) |
| 66 | |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 67 | Bool = FakeEnum(Int, [ |
José Fonseca | 0d4ef5b | 2011-03-27 12:45:40 +0100 | [diff] [blame] | 68 | "False", |
| 69 | "True", |
| 70 | ]) |
| 71 | |
José Fonseca | 1fcc39c | 2013-05-10 08:26:51 +0100 | [diff] [blame] | 72 | GLXEnum = FakeEnum(Int, [ |
José Fonseca | ecbfc9f | 2011-10-09 14:50:24 +0100 | [diff] [blame] | 73 | #"GLX_USE_GL", # 1 |
| 74 | "GLX_BUFFER_SIZE", # 2 |
| 75 | "GLX_LEVEL", # 3 |
| 76 | "GLX_RGBA", # 4 |
| 77 | "GLX_DOUBLEBUFFER", # 5 |
| 78 | "GLX_STEREO", # 6 |
| 79 | "GLX_AUX_BUFFERS", # 7 |
| 80 | "GLX_RED_SIZE", # 8 |
| 81 | "GLX_GREEN_SIZE", # 9 |
| 82 | "GLX_BLUE_SIZE", # 10 |
| 83 | "GLX_ALPHA_SIZE", # 11 |
| 84 | "GLX_DEPTH_SIZE", # 12 |
| 85 | "GLX_STENCIL_SIZE", # 13 |
| 86 | "GLX_ACCUM_RED_SIZE", # 14 |
| 87 | "GLX_ACCUM_GREEN_SIZE", # 15 |
| 88 | "GLX_ACCUM_BLUE_SIZE", # 16 |
| 89 | "GLX_ACCUM_ALPHA_SIZE", # 17 |
José Fonseca | afffa74 | 2011-05-09 23:43:39 +0100 | [diff] [blame] | 90 | |
José Fonseca | 263b3f5 | 2014-05-27 20:12:33 +0100 | [diff] [blame] | 91 | "GLX_CONFIG_CAVEAT", # 0x0020 |
| 92 | "GLX_X_VISUAL_TYPE", # 0x0022 |
| 93 | "GLX_TRANSPARENT_TYPE", # 0x0023 |
| 94 | "GLX_TRANSPARENT_INDEX_VALUE", # 0x0024 |
| 95 | "GLX_TRANSPARENT_RED_VALUE", # 0x0025 |
| 96 | "GLX_TRANSPARENT_GREEN_VALUE", # 0x0026 |
| 97 | "GLX_TRANSPARENT_BLUE_VALUE", # 0x0027 |
| 98 | "GLX_TRANSPARENT_ALPHA_VALUE", # 0x0028 |
| 99 | "GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX", # 0x0050 |
| 100 | "GLX_BAD_HYPERPIPE_CONFIG_SGIX", # 0x005B |
| 101 | "GLX_BAD_HYPERPIPE_SGIX", # 0x005C |
| 102 | "GLX_GPU_VENDOR_AMD", # 0x1F00 |
| 103 | "GLX_GPU_RENDERER_STRING_AMD", # 0x1F01 |
| 104 | "GLX_GPU_OPENGL_VERSION_STRING_AMD", # 0x1F02 |
| 105 | "GLX_CONTEXT_MAJOR_VERSION_ARB", # 0x2091 |
| 106 | "GLX_CONTEXT_MINOR_VERSION_ARB", # 0x2092 |
| 107 | "GLX_CONTEXT_FLAGS_ARB", # 0x2094 |
| 108 | "GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB", # 0x2095 |
| 109 | "GLX_FLOAT_COMPONENTS_NV", # 0x20B0 |
| 110 | "GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT", # 0x20B1 |
| 111 | "GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB", # 0x20B2 |
| 112 | "GLX_COLOR_SAMPLES_NV", # 0x20B3 |
| 113 | "GLX_RGBA_FLOAT_TYPE_ARB", # 0x20B9 |
| 114 | "GLX_VIDEO_OUT_COLOR_NV", # 0x20C3 |
| 115 | "GLX_VIDEO_OUT_ALPHA_NV", # 0x20C4 |
| 116 | "GLX_VIDEO_OUT_DEPTH_NV", # 0x20C5 |
| 117 | "GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV", # 0x20C6 |
| 118 | "GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV", # 0x20C7 |
| 119 | "GLX_VIDEO_OUT_FRAME_NV", # 0x20C8 |
| 120 | "GLX_VIDEO_OUT_FIELD_1_NV", # 0x20C9 |
| 121 | "GLX_VIDEO_OUT_FIELD_2_NV", # 0x20CA |
| 122 | "GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV", # 0x20CB |
| 123 | "GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV", # 0x20CC |
| 124 | "GLX_DEVICE_ID_NV", # 0x20CD |
| 125 | "GLX_UNIQUE_ID_NV", # 0x20CE |
| 126 | "GLX_NUM_VIDEO_CAPTURE_SLOTS_NV", # 0x20CF |
| 127 | "GLX_BIND_TO_TEXTURE_RGB_EXT", # 0x20D0 |
| 128 | "GLX_BIND_TO_TEXTURE_RGBA_EXT", # 0x20D1 |
| 129 | "GLX_BIND_TO_MIPMAP_TEXTURE_EXT", # 0x20D2 |
| 130 | "GLX_BIND_TO_TEXTURE_TARGETS_EXT", # 0x20D3 |
| 131 | "GLX_Y_INVERTED_EXT", # 0x20D4 |
| 132 | "GLX_TEXTURE_FORMAT_EXT", # 0x20D5 |
| 133 | "GLX_TEXTURE_TARGET_EXT", # 0x20D6 |
| 134 | "GLX_MIPMAP_TEXTURE_EXT", # 0x20D7 |
| 135 | "GLX_TEXTURE_FORMAT_NONE_EXT", # 0x20D8 |
| 136 | "GLX_TEXTURE_FORMAT_RGB_EXT", # 0x20D9 |
| 137 | "GLX_TEXTURE_FORMAT_RGBA_EXT", # 0x20DA |
| 138 | "GLX_TEXTURE_1D_EXT", # 0x20DB |
| 139 | "GLX_TEXTURE_2D_EXT", # 0x20DC |
| 140 | "GLX_TEXTURE_RECTANGLE_EXT", # 0x20DD |
| 141 | "GLX_FRONT_LEFT_EXT", # 0x20DE |
| 142 | "GLX_FRONT_RIGHT_EXT", # 0x20DF |
| 143 | "GLX_BACK_LEFT_EXT", # 0x20E0 |
| 144 | "GLX_BACK_RIGHT_EXT", # 0x20E1 |
| 145 | "GLX_AUX0_EXT", # 0x20E2 |
| 146 | "GLX_AUX1_EXT", # 0x20E3 |
| 147 | "GLX_AUX2_EXT", # 0x20E4 |
| 148 | "GLX_AUX3_EXT", # 0x20E5 |
| 149 | "GLX_AUX4_EXT", # 0x20E6 |
| 150 | "GLX_AUX5_EXT", # 0x20E7 |
| 151 | "GLX_AUX6_EXT", # 0x20E8 |
| 152 | "GLX_AUX7_EXT", # 0x20E9 |
| 153 | "GLX_AUX8_EXT", # 0x20EA |
| 154 | "GLX_AUX9_EXT", # 0x20EB |
| 155 | "GLX_NUM_VIDEO_SLOTS_NV", # 0x20F0 |
| 156 | "GLX_SWAP_INTERVAL_EXT", # 0x20F1 |
| 157 | "GLX_MAX_SWAP_INTERVAL_EXT", # 0x20F2 |
| 158 | "GLX_LATE_SWAPS_TEAR_EXT", # 0x20F3 |
| 159 | "GLX_BACK_BUFFER_AGE_EXT", # 0x20F4 |
| 160 | "GLX_STEREO_TREE_EXT", # 0x20F5 |
| 161 | "GLX_GPU_FASTEST_TARGET_GPUS_AMD", # 0x21A2 |
| 162 | "GLX_GPU_RAM_AMD", # 0x21A3 |
| 163 | "GLX_GPU_CLOCK_AMD", # 0x21A4 |
| 164 | "GLX_GPU_NUM_PIPES_AMD", # 0x21A5 |
| 165 | "GLX_GPU_NUM_SIMD_AMD", # 0x21A6 |
| 166 | "GLX_GPU_NUM_RB_AMD", # 0x21A7 |
| 167 | "GLX_GPU_NUM_SPI_AMD", # 0x21A8 |
| 168 | "GLX_NONE", # 0x8000 |
| 169 | "GLX_SLOW_CONFIG", # 0x8001 |
| 170 | "GLX_TRUE_COLOR", # 0x8002 |
José Fonseca | afffa74 | 2011-05-09 23:43:39 +0100 | [diff] [blame] | 171 | "GLX_DIRECT_COLOR", # 0x8003 |
| 172 | "GLX_PSEUDO_COLOR", # 0x8004 |
| 173 | "GLX_STATIC_COLOR", # 0x8005 |
José Fonseca | 263b3f5 | 2014-05-27 20:12:33 +0100 | [diff] [blame] | 174 | "GLX_GRAY_SCALE", # 0x8006 |
| 175 | "GLX_STATIC_GRAY", # 0x8007 |
José Fonseca | afffa74 | 2011-05-09 23:43:39 +0100 | [diff] [blame] | 176 | "GLX_TRANSPARENT_RGB", # 0x8008 |
| 177 | "GLX_TRANSPARENT_INDEX", # 0x8009 |
José Fonseca | 263b3f5 | 2014-05-27 20:12:33 +0100 | [diff] [blame] | 178 | "GLX_SHARE_CONTEXT_EXT", # 0x800A |
| 179 | "GLX_VISUAL_ID", # 0x800B |
| 180 | "GLX_SCREEN", # 0x800C |
| 181 | "GLX_NON_CONFORMANT_CONFIG", # 0x800D |
José Fonseca | afffa74 | 2011-05-09 23:43:39 +0100 | [diff] [blame] | 182 | "GLX_DRAWABLE_TYPE", # 0x8010 |
José Fonseca | 263b3f5 | 2014-05-27 20:12:33 +0100 | [diff] [blame] | 183 | "GLX_RENDER_TYPE", # 0x8011 |
José Fonseca | afffa74 | 2011-05-09 23:43:39 +0100 | [diff] [blame] | 184 | "GLX_X_RENDERABLE", # 0x8012 |
José Fonseca | 263b3f5 | 2014-05-27 20:12:33 +0100 | [diff] [blame] | 185 | "GLX_FBCONFIG_ID", # 0x8013 |
| 186 | "GLX_RGBA_TYPE", # 0x8014 |
José Fonseca | afffa74 | 2011-05-09 23:43:39 +0100 | [diff] [blame] | 187 | "GLX_COLOR_INDEX_TYPE", # 0x8015 |
| 188 | "GLX_MAX_PBUFFER_WIDTH", # 0x8016 |
| 189 | "GLX_MAX_PBUFFER_HEIGHT", # 0x8017 |
| 190 | "GLX_MAX_PBUFFER_PIXELS", # 0x8018 |
José Fonseca | 263b3f5 | 2014-05-27 20:12:33 +0100 | [diff] [blame] | 191 | "GLX_OPTIMAL_PBUFFER_WIDTH_SGIX", # 0x8019 |
| 192 | "GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX", # 0x801A |
José Fonseca | afffa74 | 2011-05-09 23:43:39 +0100 | [diff] [blame] | 193 | "GLX_PRESERVED_CONTENTS", # 0x801B |
| 194 | "GLX_LARGEST_PBUFFER", # 0x801C |
José Fonseca | 263b3f5 | 2014-05-27 20:12:33 +0100 | [diff] [blame] | 195 | "GLX_WIDTH", # 0x801D |
| 196 | "GLX_HEIGHT", # 0x801E |
| 197 | "GLX_EVENT_MASK", # 0x801F |
| 198 | "GLX_DAMAGED", # 0x8020 |
| 199 | "GLX_SAVED", # 0x8021 |
| 200 | "GLX_WINDOW", # 0x8022 |
| 201 | "GLX_PBUFFER", # 0x8023 |
| 202 | #"GLX_DIGITAL_MEDIA_PBUFFER_SGIX", # 0x8024 |
| 203 | "GLX_BLENDED_RGBA_SGIS", # 0x8025 |
| 204 | "GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS", # 0x8026 |
| 205 | "GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS", # 0x8027 |
| 206 | "GLX_VISUAL_SELECT_GROUP_SGIX", # 0x8028 |
| 207 | "GLX_HYPERPIPE_ID_SGIX", # 0x8030 |
| 208 | "GLX_PBUFFER_HEIGHT", # 0x8040 |
| 209 | "GLX_PBUFFER_WIDTH", # 0x8041 |
| 210 | "GLX_SAMPLE_BUFFERS_3DFX", # 0x8050 |
| 211 | "GLX_SAMPLES_3DFX", # 0x8051 |
| 212 | "GLX_SWAP_METHOD_OML", # 0x8060 |
| 213 | "GLX_SWAP_EXCHANGE_OML", # 0x8061 |
| 214 | "GLX_SWAP_COPY_OML", # 0x8062 |
| 215 | "GLX_SWAP_UNDEFINED_OML", # 0x8063 |
| 216 | "GLX_EXCHANGE_COMPLETE_INTEL", # 0x8180 |
| 217 | "GLX_COPY_COMPLETE_INTEL", # 0x8181 |
| 218 | "GLX_FLIP_COMPLETE_INTEL", # 0x8182 |
| 219 | "GLX_RENDERER_VENDOR_ID_MESA", # 0x8183 |
| 220 | "GLX_RENDERER_DEVICE_ID_MESA", # 0x8184 |
| 221 | "GLX_RENDERER_VERSION_MESA", # 0x8185 |
| 222 | "GLX_RENDERER_ACCELERATED_MESA", # 0x8186 |
| 223 | "GLX_RENDERER_VIDEO_MEMORY_MESA", # 0x8187 |
| 224 | "GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA", # 0x8188 |
| 225 | "GLX_RENDERER_PREFERRED_PROFILE_MESA", # 0x8189 |
| 226 | "GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA", # 0x818A |
| 227 | "GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA", # 0x818B |
| 228 | "GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA", # 0x818C |
| 229 | "GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA", # 0x818D |
| 230 | "GLX_RENDERER_ID_MESA", # 0x818E |
| 231 | "GLX_LOSE_CONTEXT_ON_RESET_ARB", # 0x8252 |
| 232 | "GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB", # 0x8256 |
| 233 | "GLX_NO_RESET_NOTIFICATION_ARB", # 0x8261 |
| 234 | "GLX_CONTEXT_PROFILE_MASK_ARB", # 0x9126 |
| 235 | "GLX_SAMPLE_BUFFERS", # 0x186A0 |
| 236 | "GLX_SAMPLES", # 0x186A1 |
| 237 | "GLX_DONT_CARE", # 0xFFFFFFFF |
José Fonseca | 0d4ef5b | 2011-03-27 12:45:40 +0100 | [diff] [blame] | 238 | ]) |
| 239 | |
| 240 | GLXError = FakeEnum(Int, [ |
| 241 | "GLX_BAD_SCREEN", |
| 242 | "GLX_BAD_ATTRIBUTE", |
| 243 | "GLX_NO_EXTENSION", |
| 244 | "GLX_BAD_VISUAL", |
| 245 | "GLX_BAD_CONTEXT", |
| 246 | "GLX_BAD_VALUE", |
| 247 | "GLX_BAD_ENUM", |
| 248 | ]) |
| 249 | |
José Fonseca | 6467406 | 2011-05-10 20:33:43 +0100 | [diff] [blame] | 250 | GLXname = FakeEnum(Int, [ |
| 251 | "GLX_VENDOR", |
| 252 | "GLX_VERSION", |
| 253 | "GLX_EXTENSIONS", |
| 254 | ]) |
José Fonseca | 0d4ef5b | 2011-03-27 12:45:40 +0100 | [diff] [blame] | 255 | |
| 256 | GLXbuffer = Flags(Int, [ |
| 257 | "GLX_WINDOW_BIT", |
| 258 | "GLX_PIXMAP_BIT", |
| 259 | "GLX_PBUFFER_BIT", |
| 260 | "GLX_AUX_BUFFERS_BIT", |
| 261 | "GLX_FRONT_LEFT_BUFFER_BIT", |
| 262 | "GLX_FRONT_RIGHT_BUFFER_BIT", |
| 263 | "GLX_BACK_LEFT_BUFFER_BIT", |
| 264 | "GLX_BACK_RIGHT_BUFFER_BIT", |
| 265 | "GLX_DEPTH_BUFFER_BIT", |
| 266 | "GLX_STENCIL_BUFFER_BIT", |
| 267 | "GLX_ACCUM_BUFFER_BIT", |
| 268 | ]) |
| 269 | |
José Fonseca | 0d4ef5b | 2011-03-27 12:45:40 +0100 | [diff] [blame] | 270 | GLXbuffer = Flags(Int, [ |
| 271 | "GLX_RGBA_BIT", |
| 272 | "GLX_COLOR_INDEX_BIT", |
| 273 | "GLX_PBUFFER_CLOBBER_MASK", |
| 274 | ]) |
José Fonseca | 99771fc | 2010-11-25 20:32:59 +0000 | [diff] [blame] | 275 | |
José Fonseca | 48a92b9 | 2013-07-20 15:34:24 +0100 | [diff] [blame] | 276 | UnusedAttribs = AttribArray(Const(GLXEnum), []) |
Andreas Hartmetz | b936e55 | 2013-07-08 12:36:11 +0200 | [diff] [blame] | 277 | |
Andreas Hartmetz | 0fd709f | 2013-07-09 22:54:49 +0200 | [diff] [blame] | 278 | GLXCommonSizeAttribs = [ |
Andreas Hartmetz | b936e55 | 2013-07-08 12:36:11 +0200 | [diff] [blame] | 279 | ('GLX_RED_SIZE', UInt), |
| 280 | ('GLX_GREEN_SIZE', UInt), |
| 281 | ('GLX_BLUE_SIZE', UInt), |
| 282 | ('GLX_ALPHA_SIZE', UInt), |
| 283 | ('GLX_DEPTH_SIZE', UInt), |
| 284 | ('GLX_STENCIL_SIZE', UInt), |
| 285 | ('GLX_ACCUM_RED_SIZE', UInt), |
| 286 | ('GLX_ACCUM_GREEN_SIZE', UInt), |
| 287 | ('GLX_ACCUM_BLUE_SIZE', UInt), |
Andreas Hartmetz | 0fd709f | 2013-07-09 22:54:49 +0200 | [diff] [blame] | 288 | ('GLX_ACCUM_ALPHA_SIZE', UInt) |
| 289 | ] |
| 290 | |
| 291 | GLXVisualAttribs = AttribArray(GLXEnum, GLXCommonSizeAttribs + [ |
| 292 | ('GLX_USE_GL', None), |
| 293 | ('GLX_BUFFER_SIZE', UInt), |
| 294 | ('GLX_LEVEL', Int), |
| 295 | ('GLX_RGBA', None), |
| 296 | ('GLX_DOUBLEBUFFER', None), |
| 297 | ('GLX_STEREO', None), |
Andreas Hartmetz | e0d4aba | 2013-07-12 10:46:51 +0200 | [diff] [blame] | 298 | ('GLX_AUX_BUFFERS', UInt), |
| 299 | ('GLX_SAMPLE_BUFFERS', UInt), |
| 300 | ('GLX_SAMPLES', UInt)], |
Andreas Hartmetz | 0fd709f | 2013-07-09 22:54:49 +0200 | [diff] [blame] | 301 | ) |
| 302 | |
| 303 | GLXFBConfigCommonAttribs = GLXCommonSizeAttribs + [ |
| 304 | ('GLX_BUFFER_SIZE', UInt), |
| 305 | ('GLX_LEVEL', Int), |
| 306 | ('GLX_DOUBLEBUFFER', Bool), |
| 307 | ('GLX_STEREO', Bool), |
| 308 | ('GLX_AUX_BUFFERS', UInt), |
Andreas Hartmetz | e0d4aba | 2013-07-12 10:46:51 +0200 | [diff] [blame] | 309 | ('GLX_SAMPLE_BUFFERS', UInt), |
| 310 | ('GLX_SAMPLES', UInt), |
Andreas Hartmetz | b936e55 | 2013-07-08 12:36:11 +0200 | [diff] [blame] | 311 | ('GLX_RENDER_TYPE', Flags(Int, ["GLX_RGBA_BIT", "GLX_COLOR_INDEX_BIT"])), |
| 312 | ('GLX_DRAWABLE_TYPE', Flags(Int, ["GLX_WINDOW_BIT", "GLX_PIXMAP_BIT", "GLX_PBUFFER_BIT"])), |
| 313 | ('GLX_X_RENDERABLE', Bool), |
| 314 | ('GLX_X_VISUAL_TYPE', FakeEnum(Int, ["GLX_TRUE_COLOR", "GLX_DIRECT_COLOR", "GLX_PSEUDO_COLOR", "GLX_STATIC_COLOR"])), |
| 315 | ('GLX_CONFIG_CAVEAT', FakeEnum(Int, ["GLX_NONE", "GLX_SLOW_CONFIG", "GLX_NON_CONFORMANT_CONFIG"])), |
| 316 | ('GLX_TRANSPARENT_TYPE', FakeEnum(Int, ["GLX_NONE", "GLX_TRANSPARENT_RGB", "GLX_TRANSPARENT_INDEX"])), |
| 317 | ('GLX_TRANSPARENT_INDEX_VALUE', Int), |
| 318 | ('GLX_TRANSPARENT_RED_VALUE', Int), |
| 319 | ('GLX_TRANSPARENT_GREEN_VALUE', Int), |
| 320 | ('GLX_TRANSPARENT_BLUE_VALUE', Int), |
| 321 | ('GLX_TRANSPARENT_ALPHA_VALUE', Int) |
Andreas Hartmetz | b936e55 | 2013-07-08 12:36:11 +0200 | [diff] [blame] | 322 | ] |
| 323 | |
| 324 | GLXFBConfigGLXAttribs = GLXFBConfigCommonAttribs + [ |
| 325 | ('GLX_FBCONFIG_ID', Int), # an XID, can we do better than int? |
Andreas Hartmetz | e0d4aba | 2013-07-12 10:46:51 +0200 | [diff] [blame] | 326 | ('GLX_MAX_PBUFFER_WIDTH', Int), |
| 327 | ('GLX_MAX_PBUFFER_HEIGHT', Int), |
| 328 | ('GLX_MAX_PBUFFER_PIXELS', Int), |
| 329 | ('GLX_VISUAL_ID', Int) # another XID |
Andreas Hartmetz | b936e55 | 2013-07-08 12:36:11 +0200 | [diff] [blame] | 330 | ] |
| 331 | |
José Fonseca | 48a92b9 | 2013-07-20 15:34:24 +0100 | [diff] [blame] | 332 | GLXFBConfigAttribs = AttribArray(Const(GLXEnum), GLXFBConfigGLXAttribs) |
| 333 | GLXFBConfigSGIXAttribs = AttribArray(GLXEnum, GLXFBConfigCommonAttribs) |
Andreas Hartmetz | b936e55 | 2013-07-08 12:36:11 +0200 | [diff] [blame] | 334 | |
José Fonseca | 48a92b9 | 2013-07-20 15:34:24 +0100 | [diff] [blame] | 335 | GLXContextARBAttribs = AttribArray(Const(GLXEnum), [ |
José Fonseca | 6665403 | 2013-10-11 14:21:39 -0700 | [diff] [blame] | 336 | ('GLX_RENDER_TYPE', Flags(Int, ["GLX_RGBA_BIT", "GLX_COLOR_INDEX_BIT"])), |
Andreas Hartmetz | ba7bb0d | 2013-07-07 22:51:12 +0200 | [diff] [blame] | 337 | ('GLX_CONTEXT_MAJOR_VERSION_ARB', Int), |
| 338 | ('GLX_CONTEXT_MINOR_VERSION_ARB', Int), |
José Fonseca | 6665403 | 2013-10-11 14:21:39 -0700 | [diff] [blame] | 339 | ('GLX_CONTEXT_FLAGS_ARB', Flags(Int, ["GLX_CONTEXT_DEBUG_BIT_ARB", "GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB", "GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB"])), |
| 340 | ('GLX_CONTEXT_PROFILE_MASK_ARB', Flags(Int, ["GLX_CONTEXT_CORE_PROFILE_BIT_ARB", "GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB"])), |
| 341 | ('GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB', GLXEnum), |
Andreas Hartmetz | ba7bb0d | 2013-07-07 22:51:12 +0200 | [diff] [blame] | 342 | ]) |
| 343 | |
José Fonseca | 48a92b9 | 2013-07-20 15:34:24 +0100 | [diff] [blame] | 344 | GLXPbufferAttribs = AttribArray(Const(GLXEnum), [ |
Andreas Hartmetz | b936e55 | 2013-07-08 12:36:11 +0200 | [diff] [blame] | 345 | ('GLX_PBUFFER_WIDTH', Int), |
| 346 | ('GLX_PBUFFER_HEIGHT', Int), |
| 347 | ('GLX_LARGEST_PBUFFER', Bool), |
| 348 | ('GLX_PRESERVED_CONTENTS', Bool) |
| 349 | ]) |
| 350 | |
| 351 | GLXPbufferSGIXAttribs = AttribArray(GLXEnum, [ |
| 352 | ('GLX_PRESERVED_CONTENTS_SGIX', Bool), |
| 353 | ('GLX_LARGEST_PBUFFER', Bool), |
José Fonseca | 8d6273e | 2013-11-29 16:25:36 +0000 | [diff] [blame] | 354 | #('GLX_DIGITAL_MEDIA_PBUFFER_SGIX', Bool), |
| 355 | ]) |
Andreas Hartmetz | b936e55 | 2013-07-08 12:36:11 +0200 | [diff] [blame] | 356 | |
José Fonseca | 8130193 | 2012-11-11 00:10:20 +0000 | [diff] [blame] | 357 | glxapi = Module("GLX") |
José Fonseca | 99771fc | 2010-11-25 20:32:59 +0000 | [diff] [blame] | 358 | |
| 359 | PROC = Opaque("__GLXextFuncPtr") |
| 360 | |
José Fonseca | 54f304a | 2012-01-14 19:33:08 +0000 | [diff] [blame] | 361 | glxapi.addFunctions([ |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 362 | # GLX_VERSION_1_0 |
Andreas Hartmetz | 0fd709f | 2013-07-09 22:54:49 +0200 | [diff] [blame] | 363 | Function(Pointer(XVisualInfo), "glXChooseVisual", [(Display, "dpy"), (Int, "screen"), (GLXVisualAttribs, "attribList")]), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 364 | Function(GLXContext, "glXCreateContext", [(Display, "dpy"), (Pointer(XVisualInfo), "vis"), (GLXContext, "shareList"), (Bool, "direct")]), |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 365 | Function(Void, "glXDestroyContext", [(Display, "dpy"), (GLXContext, "ctx")]), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 366 | Function(Bool, "glXMakeCurrent", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLXContext, "ctx")]), |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 367 | Function(Void, "glXCopyContext", [(Display, "dpy"), (GLXContext, "src"), (GLXContext, "dst"), |
| 368 | (ULong, "mask")]), |
| 369 | Function(Void, "glXSwapBuffers", [(Display, "dpy"), (GLXDrawable, "drawable")]), |
| 370 | Function(GLXPixmap, "glXCreateGLXPixmap", [(Display, "dpy"), (Pointer(XVisualInfo), "visual"), |
| 371 | (Pixmap, "pixmap")]), |
| 372 | Function(Void, "glXDestroyGLXPixmap", [(Display, "dpy"), (GLXPixmap, "pixmap")]), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 373 | Function(Bool, "glXQueryExtension", [(Display, "dpy"), Out(Pointer(Int), "errorb"), Out(Pointer(Int), "event")]), |
| 374 | Function(Bool, "glXQueryVersion", [(Display, "dpy"), Out(Pointer(Int), "maj"), Out(Pointer(Int), "min")]), |
| 375 | Function(Bool, "glXIsDirect", [(Display, "dpy"), (GLXContext, "ctx")]), |
José Fonseca | 0d4ef5b | 2011-03-27 12:45:40 +0100 | [diff] [blame] | 376 | Function(GLXError, "glXGetConfig", [(Display, "dpy"), (Pointer(XVisualInfo), "visual"), |
José Fonseca | 1fcc39c | 2013-05-10 08:26:51 +0100 | [diff] [blame] | 377 | (GLXEnum, "attrib"), Out(Pointer(Int), "value")]), |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 378 | Function(GLXContext, "glXGetCurrentContext", [], sideeffects=False), |
| 379 | Function(GLXDrawable, "glXGetCurrentDrawable", [], sideeffects=False), |
| 380 | Function(Void, "glXWaitGL", []), |
| 381 | Function(Void, "glXWaitX", []), |
| 382 | Function(Void, "glXUseXFont", [(Font, "font"), (Int, "first"), (Int, "count"), (Int, "list")]), |
| 383 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 384 | # GLX_VERSION_1_1 |
José Fonseca | 0358fa2 | 2012-10-13 09:26:17 +0100 | [diff] [blame] | 385 | Function((ConstCString), "glXQueryExtensionsString", [(Display, "dpy"), (Int, "screen")], sideeffects=False), |
| 386 | Function((ConstCString), "glXQueryServerString", [(Display, "dpy"), (Int, "screen"), (GLXname, "name")], sideeffects=False), |
| 387 | Function((ConstCString), "glXGetClientString", [(Display, "dpy"), (GLXname, "name")], sideeffects=False), |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 388 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 389 | # GLX_VERSION_1_2 |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 390 | Function(Display, "glXGetCurrentDisplay", [], sideeffects=False), |
| 391 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 392 | # GLX_VERSION_1_3 |
Andreas Hartmetz | b936e55 | 2013-07-08 12:36:11 +0200 | [diff] [blame] | 393 | Function(Array(GLXFBConfig, "*nitems"), "glXChooseFBConfig", [(Display, "dpy"), (Int, "screen"), (GLXFBConfigAttribs, "attribList"), Out(Pointer(Int), "nitems")]), |
José Fonseca | 1fcc39c | 2013-05-10 08:26:51 +0100 | [diff] [blame] | 394 | Function(Int, "glXGetFBConfigAttrib", [(Display, "dpy"), (GLXFBConfig, "config"), (GLXEnum, "attribute"), Out(Pointer(Int), "value")]), |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 395 | Function(Array(GLXFBConfig, "*nelements"), "glXGetFBConfigs", [(Display, "dpy"), (Int, "screen"), |
José Fonseca | 0d4ef5b | 2011-03-27 12:45:40 +0100 | [diff] [blame] | 396 | Out(Pointer(Int), "nelements")]), |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 397 | Function(Pointer(XVisualInfo), "glXGetVisualFromFBConfig", [(Display, "dpy"), |
| 398 | (GLXFBConfig, "config")]), |
| 399 | Function(GLXWindow, "glXCreateWindow", [(Display, "dpy"), (GLXFBConfig, "config"), |
Andreas Hartmetz | b936e55 | 2013-07-08 12:36:11 +0200 | [diff] [blame] | 400 | (Window, "win"), (UnusedAttribs, "attribList")]), |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 401 | Function(Void, "glXDestroyWindow", [(Display, "dpy"), (GLXWindow, "window")]), |
| 402 | Function(GLXPixmap, "glXCreatePixmap", [(Display, "dpy"), (GLXFBConfig, "config"), |
Andreas Hartmetz | b936e55 | 2013-07-08 12:36:11 +0200 | [diff] [blame] | 403 | (Pixmap, "pixmap"), (UnusedAttribs, "attribList")]), |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 404 | Function(Void, "glXDestroyPixmap", [(Display, "dpy"), (GLXPixmap, "pixmap")]), |
| 405 | Function(GLXPbuffer, "glXCreatePbuffer", [(Display, "dpy"), (GLXFBConfig, "config"), |
Andreas Hartmetz | b936e55 | 2013-07-08 12:36:11 +0200 | [diff] [blame] | 406 | (GLXPbufferAttribs, "attribList")]), |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 407 | Function(Void, "glXDestroyPbuffer", [(Display, "dpy"), (GLXPbuffer, "pbuf")]), |
José Fonseca | 0d4ef5b | 2011-03-27 12:45:40 +0100 | [diff] [blame] | 408 | Function(Void, "glXQueryDrawable", [(Display, "dpy"), (GLXDrawable, "draw"), (GLXEnum, "attribute"), |
| 409 | Out(Pointer(UInt), "value")]), |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 410 | Function(GLXContext, "glXCreateNewContext", [(Display, "dpy"), (GLXFBConfig, "config"), |
José Fonseca | 0d4ef5b | 2011-03-27 12:45:40 +0100 | [diff] [blame] | 411 | (GLXEnum, "renderType"), (GLXContext, "shareList"), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 412 | (Bool, "direct")]), |
| 413 | Function(Bool, "glXMakeContextCurrent", [(Display, "dpy"), (GLXDrawable, "draw"), |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 414 | (GLXDrawable, "read"), (GLXContext, "ctx")]), |
| 415 | Function(GLXDrawable, "glXGetCurrentReadDrawable", []), |
José Fonseca | 0d4ef5b | 2011-03-27 12:45:40 +0100 | [diff] [blame] | 416 | Function(Int, "glXQueryContext", [(Display, "dpy"), (GLXContext, "ctx"), (GLXEnum, "attribute"), |
| 417 | Out(Pointer(Int), "value")]), |
Zack Rusin | f3f2e46 | 2011-03-23 18:35:39 -0400 | [diff] [blame] | 418 | Function(Void, "glXSelectEvent", [(Display, "dpy"), (GLXDrawable, "drawable"), |
| 419 | (ULong, "mask")]), |
| 420 | Function(Void, "glXGetSelectedEvent", [(Display, "dpy"), (GLXDrawable, "drawable"), |
José Fonseca | 0d4ef5b | 2011-03-27 12:45:40 +0100 | [diff] [blame] | 421 | Out(Pointer(ULong), "mask")]), |
José Fonseca | 5a76ccf | 2011-06-03 19:34:55 +0100 | [diff] [blame] | 422 | |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 423 | # GLX_ARB_create_context |
Andreas Hartmetz | ba7bb0d | 2013-07-07 22:51:12 +0200 | [diff] [blame] | 424 | Function(GLXContext, "glXCreateContextAttribsARB", [(Display, "dpy"), (GLXFBConfig, "config"), |
| 425 | (GLXContext, "share_context"), (Bool, "direct"), |
Andreas Hartmetz | d06fb34 | 2013-07-12 11:49:39 +0200 | [diff] [blame] | 426 | (GLXContextARBAttribs, "attrib_list")]), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 427 | |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 428 | # GLX_EXT_import_context |
| 429 | Function(Display, "glXGetCurrentDisplayEXT", []), |
| 430 | Function(Int, "glXQueryContextInfoEXT", [(Display, "dpy"), (GLXContext, "context"), (Int, "attribute"), (OpaquePointer(Int), "value")]), |
| 431 | Function(GLXContextID, "glXGetContextIDEXT", [(Const(GLXContext), "context")]), |
| 432 | Function(GLXContext, "glXImportContextEXT", [(Display, "dpy"), (GLXContextID, "contextID")]), |
| 433 | Function(Void, "glXFreeContextEXT", [(Display, "dpy"), (GLXContext, "context")]), |
| 434 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 435 | # GLX_EXT_swap_control |
| 436 | Function(Void, "glXSwapIntervalEXT", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "interval")]), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 437 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 438 | # GLX_EXT_texture_from_pixmap |
| 439 | Function(Void, "glXBindTexImageEXT", [(Display, "display"), (GLXDrawable, "drawable"), (GLXEnum, "buffer"), (GLXFBConfigAttribs, "attrib_list")]), |
| 440 | Function(Void, "glXReleaseTexImageEXT", [(Display, "display"), (GLXDrawable, "drawable"), (GLXEnum, "buffer")]), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 441 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 442 | # GLX_MESA_agp_offset |
| 443 | Function(UInt, "glXGetAGPOffsetMESA", [(OpaquePointer(Const(Void)), "pointer")]), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 444 | |
| 445 | # GLX_MESA_copy_sub_buffer |
| 446 | Function(Void, "glXCopySubBufferMESA", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "x"), (Int, "y"), (Int, "width"), (Int, "height")]), |
| 447 | |
| 448 | # GLX_MESA_pixmap_colormap |
José Fonseca | 917329e | 2011-10-19 17:28:49 +0200 | [diff] [blame] | 449 | Function(GLXPixmap, "glXCreateGLXPixmapMESA", [(Display, "dpy"), (Pointer(XVisualInfo), "visual"), (Pixmap, "pixmap"), (Colormap, "cmap")]), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 450 | |
| 451 | # GLX_MESA_release_buffers |
| 452 | Function(Bool, "glXReleaseBuffersMESA", [(Display, "dpy"), (GLXDrawable, "drawable")]), |
| 453 | |
| 454 | # GLX_MESA_set_3dfx_mode |
| 455 | Function(Bool, "glXSet3DfxModeMESA", [(Int, "mode")]), |
| 456 | |
José Fonseca | 8dfb0e5 | 2012-01-10 19:39:12 +0000 | [diff] [blame] | 457 | # GLX_MESA_swap_control |
| 458 | Function(Int, "glXSwapIntervalMESA", [(UInt, "interval")]), |
José Fonseca | 0358fa2 | 2012-10-13 09:26:17 +0100 | [diff] [blame] | 459 | Function(Int, "glXGetSwapIntervalMESA", [], sideeffects=False), |
José Fonseca | 8dfb0e5 | 2012-01-10 19:39:12 +0000 | [diff] [blame] | 460 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 461 | # GLX_NV_copy_image |
| 462 | Function(Void, "glXCopyImageSubDataNV", [(Display, "dpy"), (GLXContext, "srcCtx"), (GLuint, "srcName"), (GLenum, "srcTarget"), (GLint, "srcLevel"), (GLint, "srcX"), (GLint, "srcY"), (GLint, "srcZ"), (GLXContext, "dstCtx"), (GLuint, "dstName"), (GLenum, "dstTarget"), (GLint, "dstLevel"), (GLint, "dstX"), (GLint, "dstY"), (GLint, "dstZ"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth")]), |
| 463 | |
| 464 | # GLX_NV_present_video |
| 465 | Function(Array(UInt, "(nelements ? *nelements : 0)"), "glXEnumerateVideoDevicesNV", [(Display, "dpy"), (Int, "screen"), Out(Pointer(Int), "nelements")]), |
| 466 | Function(Int, "glXBindVideoDeviceNV", [(Display, "dpy"), (UInt, "video_slot"), (UInt, "video_device"), (UnusedAttribs, "attrib_list")]), |
| 467 | |
| 468 | # GLX_NV_swap_group |
| 469 | Function(Bool, "glXJoinSwapGroupNV", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLuint, "group")]), |
| 470 | Function(Bool, "glXBindSwapBarrierNV", [(Display, "dpy"), (GLuint, "group"), (GLuint, "barrier")]), |
| 471 | Function(Bool, "glXQuerySwapGroupNV", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(GLuint), "group"), (OpaquePointer(GLuint), "barrier")]), |
| 472 | Function(Bool, "glXQueryMaxSwapGroupsNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(GLuint), "maxGroups"), (OpaquePointer(GLuint), "maxBarriers")]), |
| 473 | Function(Bool, "glXQueryFrameCountNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(GLuint), "count")]), |
| 474 | Function(Bool, "glXResetFrameCountNV", [(Display, "dpy"), (Int, "screen")]), |
| 475 | |
| 476 | # GLX_NV_vertex_array_range |
| 477 | Function(OpaquePointer(Void), "glXAllocateMemoryNV", [(GLsizei, "size"), (GLfloat, "readfreq"), (GLfloat, "writefreq"), (GLfloat, "priority")]), |
| 478 | Function(Void, "glXFreeMemoryNV", [(OpaquePointer(Void), "pointer")]), |
| 479 | |
| 480 | # GLX_NV_video_capture |
| 481 | Function(Int, "glXBindVideoCaptureDeviceNV", [(Display, "dpy"), (UInt, "video_capture_slot"), (GLXVideoCaptureDeviceNV, "device")]), |
| 482 | Function(Array(GLXVideoCaptureDeviceNV, "(nelements ? *nelements : 0)"), "glXEnumerateVideoCaptureDevicesNV", [(Display, "dpy"), (Int, "screen"), Out(Pointer(Int), "nelements")]), |
| 483 | Function(Void, "glXLockVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device")]), |
| 484 | Function(Int, "glXQueryVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device"), (Int, "attribute"), Out(Pointer(Int), "value")], sideeffects=False), |
| 485 | Function(Void, "glXReleaseVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device")]), |
| 486 | |
| 487 | # GLX_NV_video_output |
| 488 | Function(Int, "glXGetVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (Int, "numVideoDevices"), Out(Array(GLXVideoDeviceNV, "numVideoDevices"), "pVideoDevice")]), |
| 489 | Function(Int, "glXReleaseVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (GLXVideoDeviceNV, "VideoDevice")]), |
| 490 | Function(Int, "glXBindVideoImageNV", [(Display, "dpy"), (GLXVideoDeviceNV, "VideoDevice"), (GLXPbuffer, "pbuf"), (Int, "iVideoBuffer")]), |
| 491 | Function(Int, "glXReleaseVideoImageNV", [(Display, "dpy"), (GLXPbuffer, "pbuf")]), |
| 492 | Function(Int, "glXSendPbufferToVideoNV", [(Display, "dpy"), (GLXPbuffer, "pbuf"), (Int, "iBufferType"), Out(Pointer(ULong), "pulCounterPbuffer"), (GLboolean, "bBlock")]), |
| 493 | Function(Int, "glXGetVideoInfoNV", [(Display, "dpy"), (Int, "screen"), (GLXVideoDeviceNV, "VideoDevice"), Out(Pointer(ULong), "pulCounterOutputPbuffer"), Out(Pointer(ULong), "pulCounterOutputVideo")], sideeffects=False), |
| 494 | |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 495 | # GLX_OML_sync_control |
| 496 | Function(Bool, "glXGetSyncValuesOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]), |
| 497 | Function(Bool, "glXGetMscRateOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(Int32), "numerator"), (OpaquePointer(Int32), "denominator")]), |
| 498 | Function(Int64, "glXSwapBuffersMscOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int64, "target_msc"), (Int64, "divisor"), (Int64, "remainder")]), |
| 499 | Function(Bool, "glXWaitForMscOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int64, "target_msc"), (Int64, "divisor"), (Int64, "remainder"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]), |
| 500 | Function(Bool, "glXWaitForSbcOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int64, "target_sbc"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]), |
| 501 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 502 | # GLX_SGI_cushion |
| 503 | Function(Void, "glXCushionSGI", [(Display, "dpy"), (Window, "window"), (Float, "cushion")]), |
| 504 | |
| 505 | # GLX_SGI_make_current_read |
| 506 | Function(Bool, "glXMakeCurrentReadSGI", [(Display, "dpy"), (GLXDrawable, "draw"), (GLXDrawable, "read"), (GLXContext, "ctx")]), |
| 507 | Function(GLXDrawable, "glXGetCurrentReadDrawableSGI", []), |
| 508 | |
| 509 | # GLX_SGI_swap_control |
| 510 | Function(Int, "glXSwapIntervalSGI", [(Int, "interval")]), |
| 511 | |
| 512 | # GLX_SGI_video_sync |
| 513 | Function(Int, "glXGetVideoSyncSGI", [(OpaquePointer(UInt), "count")]), |
| 514 | Function(Int, "glXWaitVideoSyncSGI", [(Int, "divisor"), (Int, "remainder"), (OpaquePointer(UInt), "count")]), |
| 515 | |
| 516 | # GLX_SGIX_dmbuffer |
| 517 | #Function(Bool, "glXAssociateDMPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuffer"), (OpaquePointer(DMparams), "params"), (DMbuffer, "dmbuffer")]), |
| 518 | |
| 519 | # GLX_SGIX_fbconfig |
José Fonseca | ae8edfb | 2014-06-18 16:03:23 +0100 | [diff] [blame^] | 520 | Function(Int, "glXGetFBConfigAttribSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (GLXEnum, "attribute"), Out(Pointer(Int), "value")]), |
| 521 | Function(Array(GLXFBConfigSGIX, "*nelements"), "glXChooseFBConfigSGIX", [(Display, "dpy"), (Int, "screen"), (GLXFBConfigSGIXAttribs, "attrib_list"), Out(Pointer(Int), "nelements")]), |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 522 | Function(GLXPixmap, "glXCreateGLXPixmapWithConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Pixmap, "pixmap")]), |
José Fonseca | ae8edfb | 2014-06-18 16:03:23 +0100 | [diff] [blame^] | 523 | Function(GLXContext, "glXCreateContextWithConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (GLXEnum, "render_type"), (GLXContext, "share_list"), (Bool, "direct")]), |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 524 | Function(Pointer(XVisualInfo), "glXGetVisualFromFBConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config")]), |
José Fonseca | ae8edfb | 2014-06-18 16:03:23 +0100 | [diff] [blame^] | 525 | Function(GLXFBConfigSGIX, "glXGetFBConfigFromVisualSGIX", [(Display, "dpy"), (Pointer(XVisualInfo), "vis")]), |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 526 | |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 527 | # GLX_SGIX_hyperpipe |
| 528 | #Function(OpaquePointer(GLXHyperpipeNetworkSGIX), "glXQueryHyperpipeNetworkSGIX", [(Display, "dpy"), (OpaquePointer(Int), "npipes")]), |
| 529 | #Function(Int, "glXHyperpipeConfigSGIX", [(Display, "dpy"), (Int, "networkId"), (Int, "npipes"), (OpaquePointer(GLXHyperpipeConfigSGIX), "cfg"), (OpaquePointer(Int), "hpId")]), |
| 530 | #Function(OpaquePointer(GLXHyperpipeConfigSGIX), "glXQueryHyperpipeConfigSGIX", [(Display, "dpy"), (Int, "hpId"), (OpaquePointer(Int), "npipes")]), |
| 531 | #Function(Int, "glXDestroyHyperpipeConfigSGIX", [(Display, "dpy"), (Int, "hpId")]), |
| 532 | #Function(Int, "glXBindHyperpipeSGIX", [(Display, "dpy"), (Int, "hpId")]), |
| 533 | #Function(Int, "glXQueryHyperpipeBestAttribSGIX", [(Display, "dpy"), (Int, "timeSlice"), (Int, "attrib"), (Int, "size"), (OpaquePointer(Void), "attribList"), (OpaquePointer(Void), "returnAttribList")]), |
| 534 | #Function(Int, "glXHyperpipeAttribSGIX", [(Display, "dpy"), (Int, "timeSlice"), (Int, "attrib"), (Int, "size"), (OpaquePointer(Void), "attribList")]), |
| 535 | #Function(Int, "glXQueryHyperpipeAttribSGIX", [(Display, "dpy"), (Int, "timeSlice"), (Int, "attrib"), (Int, "size"), (OpaquePointer(Void), "returnAttribList")]), |
| 536 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 537 | # GLX_SGIX_pbuffer |
| 538 | Function(GLXPbufferSGIX, "glXCreateGLXPbufferSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (UInt, "width"), (UInt, "height"), (GLXPbufferSGIXAttribs, "attrib_list")]), |
| 539 | Function(Void, "glXDestroyGLXPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuf")]), |
| 540 | Function(Int, "glXQueryGLXPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuf"), (Int, "attribute"), Out(Pointer(UInt), "value")]), |
| 541 | Function(Void, "glXSelectEventSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (ULong, "mask")]), |
| 542 | Function(Void, "glXGetSelectedEventSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), Out(Pointer(ULong), "mask")]), |
José Fonseca | 5a76ccf | 2011-06-03 19:34:55 +0100 | [diff] [blame] | 543 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 544 | # GLX_SGIX_swap_barrier |
| 545 | Function(Void, "glXBindSwapBarrierSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "barrier")]), |
| 546 | Function(Bool, "glXQueryMaxSwapBarriersSGIX", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "max")]), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 547 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 548 | # GLX_SGIX_swap_group |
| 549 | Function(Void, "glXJoinSwapGroupSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLXDrawable, "member")]), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 550 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 551 | # GLX_SGIX_video_resize |
| 552 | Function(Int, "glXBindChannelToWindowSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (Window, "window")]), |
| 553 | Function(Int, "glXChannelRectSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (Int, "x"), (Int, "y"), (Int, "w"), (Int, "h")]), |
| 554 | Function(Int, "glXQueryChannelRectSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (OpaquePointer(Int), "dx"), (OpaquePointer(Int), "dy"), (OpaquePointer(Int), "dw"), (OpaquePointer(Int), "dh")]), |
| 555 | Function(Int, "glXQueryChannelDeltasSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (OpaquePointer(Int), "x"), (OpaquePointer(Int), "y"), (OpaquePointer(Int), "w"), (OpaquePointer(Int), "h")]), |
| 556 | Function(Int, "glXChannelRectSyncSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (GLenum, "synctype")]), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 557 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 558 | # GLX_SGIX_video_source |
| 559 | #Function(GLXVideoSourceSGIX, "glXCreateGLXVideoSourceSGIX", [(Display, "display"), (Int, "screen"), (VLServer, "server"), (VLPath, "path"), (Int, "nodeClass"), (VLNode, "drainNode")]), |
| 560 | #Function(Void, "glXDestroyGLXVideoSourceSGIX", [(Display, "dpy"), (GLXVideoSourceSGIX, "glxvideosource")]), |
José Fonseca | 8d1f727 | 2011-06-09 00:27:27 +0100 | [diff] [blame] | 561 | |
José Fonseca | 08aed61 | 2014-05-30 16:22:43 +0100 | [diff] [blame] | 562 | # GLX_SUN_get_transparent_index |
| 563 | #Function(Status, "glXGetTransparentIndexSUN", [(Display, "dpy"), (Window, "overlay"), (Window, "underlay"), (OpaquePointer(Long), "pTransparentIndex")]), |
José Fonseca | 5b92de6 | 2011-09-19 19:59:44 +0100 | [diff] [blame] | 564 | |
José Fonseca | 4a826ed | 2010-11-30 16:58:22 +0000 | [diff] [blame] | 565 | # Must be last |
José Fonseca | bcfc81b | 2012-08-07 21:07:22 +0100 | [diff] [blame] | 566 | Function(PROC, "glXGetProcAddressARB", [(String(Const(GLubyte)), "procName")]), |
| 567 | Function(PROC, "glXGetProcAddress", [(String(Const(GLubyte)), "procName")]), |
José Fonseca | 99771fc | 2010-11-25 20:32:59 +0000 | [diff] [blame] | 568 | ]) |
| 569 | |
| 570 | |
José Fonseca | 7ec9050 | 2012-04-16 20:09:42 +0100 | [diff] [blame] | 571 | # To prevent collision with stdapi.Bool |
| 572 | del Bool |