1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457

        mod __gl_imports {
            pub use std::mem;
            pub use std::os::raw;
        }
    

        pub mod types {
            #![allow(non_camel_case_types, non_snake_case, dead_code, missing_copy_implementations)]
    
// Common types from OpenGL 1.1
pub type GLenum = super::__gl_imports::raw::c_uint;
pub type GLboolean = super::__gl_imports::raw::c_uchar;
pub type GLbitfield = super::__gl_imports::raw::c_uint;
pub type GLvoid = super::__gl_imports::raw::c_void;
pub type GLbyte = super::__gl_imports::raw::c_char;
pub type GLshort = super::__gl_imports::raw::c_short;
pub type GLint = super::__gl_imports::raw::c_int;
pub type GLclampx = super::__gl_imports::raw::c_int;
pub type GLubyte = super::__gl_imports::raw::c_uchar;
pub type GLushort = super::__gl_imports::raw::c_ushort;
pub type GLuint = super::__gl_imports::raw::c_uint;
pub type GLsizei = super::__gl_imports::raw::c_int;
pub type GLfloat = super::__gl_imports::raw::c_float;
pub type GLclampf = super::__gl_imports::raw::c_float;
pub type GLdouble = super::__gl_imports::raw::c_double;
pub type GLclampd = super::__gl_imports::raw::c_double;
pub type GLeglImageOES = *const super::__gl_imports::raw::c_void;
pub type GLchar = super::__gl_imports::raw::c_char;
pub type GLcharARB = super::__gl_imports::raw::c_char;

#[cfg(target_os = "macos")]
pub type GLhandleARB = *const super::__gl_imports::raw::c_void;
#[cfg(not(target_os = "macos"))]
pub type GLhandleARB = super::__gl_imports::raw::c_uint;

pub type GLhalfARB = super::__gl_imports::raw::c_ushort;
pub type GLhalf = super::__gl_imports::raw::c_ushort;

// Must be 32 bits
pub type GLfixed = GLint;

pub type GLintptr = isize;
pub type GLsizeiptr = isize;
pub type GLint64 = i64;
pub type GLuint64 = u64;
pub type GLintptrARB = isize;
pub type GLsizeiptrARB = isize;
pub type GLint64EXT = i64;
pub type GLuint64EXT = u64;

pub enum __GLsync {}
pub type GLsync = *const __GLsync;

// compatible with OpenCL cl_context
pub enum _cl_context {}
pub enum _cl_event {}

pub type GLDEBUGPROC = extern "system" fn(source: GLenum,
                                          gltype: GLenum,
                                          id: GLuint,
                                          severity: GLenum,
                                          length: GLsizei,
                                          message: *const GLchar,
                                          userParam: *mut super::__gl_imports::raw::c_void);
pub type GLDEBUGPROCARB = extern "system" fn(source: GLenum,
                                             gltype: GLenum,
                                             id: GLuint,
                                             severity: GLenum,
                                             length: GLsizei,
                                             message: *const GLchar,
                                             userParam: *mut super::__gl_imports::raw::c_void);
pub type GLDEBUGPROCKHR = extern "system" fn(source: GLenum,
                                             gltype: GLenum,
                                             id: GLuint,
                                             severity: GLenum,
                                             length: GLsizei,
                                             message: *const GLchar,
                                             userParam: *mut super::__gl_imports::raw::c_void);

// GLES 1 types
// "pub type GLclampx = i32;",

// GLES 1/2 types (tagged for GLES 1)
// "pub type GLbyte = i8;",
// "pub type GLubyte = u8;",
// "pub type GLfloat = GLfloat;",
// "pub type GLclampf = GLfloat;",
// "pub type GLfixed = i32;",
// "pub type GLint64 = i64;",
// "pub type GLuint64 = u64;",
// "pub type GLintptr = intptr_t;",
// "pub type GLsizeiptr = ssize_t;",

// GLES 1/2 types (tagged for GLES 2 - attribute syntax is limited)
// "pub type GLbyte = i8;",
// "pub type GLubyte = u8;",
// "pub type GLfloat = GLfloat;",
// "pub type GLclampf = GLfloat;",
// "pub type GLfixed = i32;",
// "pub type GLint64 = i64;",
// "pub type GLuint64 = u64;",
// "pub type GLint64EXT = i64;",
// "pub type GLuint64EXT = u64;",
// "pub type GLintptr = intptr_t;",
// "pub type GLsizeiptr = ssize_t;",

// GLES 2 types (none currently)

// Vendor extension types
pub type GLDEBUGPROCAMD = extern "system" fn(id: GLuint,
                                             category: GLenum,
                                             severity: GLenum,
                                             length: GLsizei,
                                             message: *const GLchar,
                                             userParam: *mut super::__gl_imports::raw::c_void);
pub type GLhalfNV = super::__gl_imports::raw::c_ushort;
pub type GLvdpauSurfaceNV = GLintptr;

pub type XID = super::__gl_imports::raw::c_ulong;
pub type Bool = super::__gl_imports::raw::c_int; // Not sure if this is correct...
pub enum Display {}

pub type Font = XID;
pub type Pixmap = XID;
pub enum Visual {} // TODO: not sure
pub type VisualID = super::__gl_imports::raw::c_ulong; // TODO: not sure
pub type Window = XID;
pub type GLXFBConfigID = XID;
pub type GLXFBConfig = *const super::__gl_imports::raw::c_void;
pub type GLXContextID = XID;
pub type GLXContext = *const super::__gl_imports::raw::c_void;
pub type GLXPixmap = XID;
pub type GLXDrawable = XID;
pub type GLXWindow = XID;
pub type GLXPbuffer = XID;
pub type __GLXextFuncPtr = extern "system" fn();
pub type GLXVideoCaptureDeviceNV = XID;
pub type GLXVideoDeviceNV = super::__gl_imports::raw::c_int;
pub type GLXVideoSourceSGIX = XID;
pub type GLXFBConfigIDSGIX = XID;
pub type GLXFBConfigSGIX = *const super::__gl_imports::raw::c_void;
pub type GLXPbufferSGIX = XID;

#[repr(C)]
pub struct XVisualInfo {
    pub visual: *mut Visual,
    pub visualid: VisualID,
    pub screen: super::__gl_imports::raw::c_int,
    pub depth: super::__gl_imports::raw::c_int,
    pub class: super::__gl_imports::raw::c_int,
    pub red_mask: super::__gl_imports::raw::c_ulong,
    pub green_mask: super::__gl_imports::raw::c_ulong,
    pub blue_mask: super::__gl_imports::raw::c_ulong,
    pub colormap_size: super::__gl_imports::raw::c_int,
    pub bits_per_rgb: super::__gl_imports::raw::c_int,
}

#[repr(C)]
pub struct GLXPbufferClobberEvent {
    pub event_type: super::__gl_imports::raw::c_int, // GLX_DAMAGED or GLX_SAVED
    pub draw_type: super::__gl_imports::raw::c_int, // GLX_WINDOW or GLX_PBUFFER
    pub serial: super::__gl_imports::raw::c_ulong, // # of last request processed by server
    pub send_event: Bool, // true if this came for SendEvent request
    pub display: *const Display, // display the event was read from
    pub drawable: GLXDrawable, // XID of Drawable
    pub buffer_mask: super::__gl_imports::raw::c_uint, // mask indicating which buffers are affected
    pub aux_buffer: super::__gl_imports::raw::c_uint, // which aux buffer was affected
    pub x: super::__gl_imports::raw::c_int,
    pub y: super::__gl_imports::raw::c_int,
    pub width: super::__gl_imports::raw::c_int,
    pub height: super::__gl_imports::raw::c_int,
    pub count: super::__gl_imports::raw::c_int, // if nonzero, at least this many more
}

#[repr(C)]
pub struct GLXBufferSwapComplete {
    pub type_: super::__gl_imports::raw::c_int,
    pub serial: super::__gl_imports::raw::c_ulong, // # of last request processed by server
    pub send_event: Bool, // true if this came from a SendEvent request
    pub display: *const Display, // Display the event was read from
    pub drawable: GLXDrawable, // drawable on which event was requested in event mask
    pub event_type: super::__gl_imports::raw::c_int,
    pub ust: i64,
    pub msc: i64,
    pub sbc: i64,
}

// typedef union __GLXEvent {
//     GLXPbufferClobberEvent glxpbufferclobber;
//     GLXBufferSwapComplete glxbufferswapcomplete;
//     long pad[24];
// }

#[repr(C)]
pub struct GLXBufferClobberEventSGIX {
    pub type_: super::__gl_imports::raw::c_int,
    pub serial: super::__gl_imports::raw::c_ulong, // # of last request processed by server
    pub send_event: Bool, // true if this came for SendEvent request
    pub display: *const Display, // display the event was read from
    pub drawable: GLXDrawable, // i.d. of Drawable
    pub event_type: super::__gl_imports::raw::c_int, // GLX_DAMAGED_SGIX or GLX_SAVED_SGIX
    pub draw_type: super::__gl_imports::raw::c_int, // GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX
    pub mask: super::__gl_imports::raw::c_uint, // mask indicating which buffers are affected
    pub x: super::__gl_imports::raw::c_int,
    pub y: super::__gl_imports::raw::c_int,
    pub width: super::__gl_imports::raw::c_int,
    pub height: super::__gl_imports::raw::c_int,
    pub count: super::__gl_imports::raw::c_int, // if nonzero, at least this many more
}

#[repr(C)]
pub struct GLXHyperpipeNetworkSGIX {
    pub pipeName: [super::__gl_imports::raw::c_char; 80], // Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]
    pub networkId: super::__gl_imports::raw::c_int,
}

#[repr(C)]
pub struct GLXHyperpipeConfigSGIX {
    pub pipeName: [super::__gl_imports::raw::c_char; 80], // Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]
    pub channel: super::__gl_imports::raw::c_int,
    pub participationType: super::__gl_imports::raw::c_uint,
    pub timeSlice: super::__gl_imports::raw::c_int,
}

#[repr(C)]
pub struct GLXPipeRect {
    pub pipeName: [super::__gl_imports::raw::c_char; 80], // Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]
    pub srcXOrigin: super::__gl_imports::raw::c_int,
    pub srcYOrigin: super::__gl_imports::raw::c_int,
    pub srcWidth: super::__gl_imports::raw::c_int,
    pub srcHeight: super::__gl_imports::raw::c_int,
    pub destXOrigin: super::__gl_imports::raw::c_int,
    pub destYOrigin: super::__gl_imports::raw::c_int,
    pub destWidth: super::__gl_imports::raw::c_int,
    pub destHeight: super::__gl_imports::raw::c_int,
}

#[repr(C)]
pub struct GLXPipeRectLimits {
    pub pipeName: [super::__gl_imports::raw::c_char; 80], // Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]
    pub XOrigin: super::__gl_imports::raw::c_int,
    pub YOrigin: super::__gl_imports::raw::c_int,
    pub maxHeight: super::__gl_imports::raw::c_int,
    pub maxWidth: super::__gl_imports::raw::c_int,
}


        }
    
#[allow(dead_code, non_upper_case_globals)] pub const ACCUM_ALPHA_SIZE: types::GLenum = 17;
#[allow(dead_code, non_upper_case_globals)] pub const ACCUM_BLUE_SIZE: types::GLenum = 16;
#[allow(dead_code, non_upper_case_globals)] pub const ACCUM_BUFFER_BIT: types::GLenum = 0x00000080;
#[allow(dead_code, non_upper_case_globals)] pub const ACCUM_GREEN_SIZE: types::GLenum = 15;
#[allow(dead_code, non_upper_case_globals)] pub const ACCUM_RED_SIZE: types::GLenum = 14;
#[allow(dead_code, non_upper_case_globals)] pub const ALPHA_SIZE: types::GLenum = 11;
#[allow(dead_code, non_upper_case_globals)] pub const AUX0_EXT: types::GLenum = 0x20E2;
#[allow(dead_code, non_upper_case_globals)] pub const AUX1_EXT: types::GLenum = 0x20E3;
#[allow(dead_code, non_upper_case_globals)] pub const AUX2_EXT: types::GLenum = 0x20E4;
#[allow(dead_code, non_upper_case_globals)] pub const AUX3_EXT: types::GLenum = 0x20E5;
#[allow(dead_code, non_upper_case_globals)] pub const AUX4_EXT: types::GLenum = 0x20E6;
#[allow(dead_code, non_upper_case_globals)] pub const AUX5_EXT: types::GLenum = 0x20E7;
#[allow(dead_code, non_upper_case_globals)] pub const AUX6_EXT: types::GLenum = 0x20E8;
#[allow(dead_code, non_upper_case_globals)] pub const AUX7_EXT: types::GLenum = 0x20E9;
#[allow(dead_code, non_upper_case_globals)] pub const AUX8_EXT: types::GLenum = 0x20EA;
#[allow(dead_code, non_upper_case_globals)] pub const AUX9_EXT: types::GLenum = 0x20EB;
#[allow(dead_code, non_upper_case_globals)] pub const AUX_BUFFERS: types::GLenum = 7;
#[allow(dead_code, non_upper_case_globals)] pub const AUX_BUFFERS_BIT: types::GLenum = 0x00000010;
#[allow(dead_code, non_upper_case_globals)] pub const BACK_EXT: types::GLenum = 0x20E0;
#[allow(dead_code, non_upper_case_globals)] pub const BACK_LEFT_BUFFER_BIT: types::GLenum = 0x00000004;
#[allow(dead_code, non_upper_case_globals)] pub const BACK_LEFT_EXT: types::GLenum = 0x20E0;
#[allow(dead_code, non_upper_case_globals)] pub const BACK_RIGHT_BUFFER_BIT: types::GLenum = 0x00000008;
#[allow(dead_code, non_upper_case_globals)] pub const BACK_RIGHT_EXT: types::GLenum = 0x20E1;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_ATTRIBUTE: types::GLenum = 2;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_CONTEXT: types::GLenum = 5;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_ENUM: types::GLenum = 7;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_SCREEN: types::GLenum = 1;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_VALUE: types::GLenum = 6;
#[allow(dead_code, non_upper_case_globals)] pub const BAD_VISUAL: types::GLenum = 4;
#[allow(dead_code, non_upper_case_globals)] pub const BIND_TO_MIPMAP_TEXTURE_EXT: types::GLenum = 0x20D2;
#[allow(dead_code, non_upper_case_globals)] pub const BIND_TO_TEXTURE_RGBA_EXT: types::GLenum = 0x20D1;
#[allow(dead_code, non_upper_case_globals)] pub const BIND_TO_TEXTURE_RGB_EXT: types::GLenum = 0x20D0;
#[allow(dead_code, non_upper_case_globals)] pub const BIND_TO_TEXTURE_TARGETS_EXT: types::GLenum = 0x20D3;
#[allow(dead_code, non_upper_case_globals)] pub const BLUE_SIZE: types::GLenum = 10;
#[allow(dead_code, non_upper_case_globals)] pub const BUFFER_SIZE: types::GLenum = 2;
#[allow(dead_code, non_upper_case_globals)] pub const BufferSwapComplete: types::GLenum = 1;
#[allow(dead_code, non_upper_case_globals)] pub const COLOR_INDEX_BIT: types::GLenum = 0x00000002;
#[allow(dead_code, non_upper_case_globals)] pub const COLOR_INDEX_TYPE: types::GLenum = 0x8015;
#[allow(dead_code, non_upper_case_globals)] pub const CONFIG_CAVEAT: types::GLenum = 0x20;
#[allow(dead_code, non_upper_case_globals)] pub const DAMAGED: types::GLenum = 0x8020;
#[allow(dead_code, non_upper_case_globals)] pub const DEPTH_BUFFER_BIT: types::GLenum = 0x00000020;
#[allow(dead_code, non_upper_case_globals)] pub const DEPTH_SIZE: types::GLenum = 12;
#[allow(dead_code, non_upper_case_globals)] pub const DIRECT_COLOR: types::GLenum = 0x8003;
#[allow(dead_code, non_upper_case_globals)] pub const DONT_CARE: types::GLenum = 0xFFFFFFFF;
#[allow(dead_code, non_upper_case_globals)] pub const DOUBLEBUFFER: types::GLenum = 5;
#[allow(dead_code, non_upper_case_globals)] pub const DRAWABLE_TYPE: types::GLenum = 0x8010;
#[allow(dead_code, non_upper_case_globals)] pub const EVENT_MASK: types::GLenum = 0x801F;
#[allow(dead_code, non_upper_case_globals)] pub const EXTENSIONS: types::GLenum = 0x3;
#[allow(dead_code, non_upper_case_globals)] pub const EXTENSION_NAME: &'static str = "GLX";
#[allow(dead_code, non_upper_case_globals)] pub const FBCONFIG_ID: types::GLenum = 0x8013;
#[allow(dead_code, non_upper_case_globals)] pub const FRONT_EXT: types::GLenum = 0x20DE;
#[allow(dead_code, non_upper_case_globals)] pub const FRONT_LEFT_BUFFER_BIT: types::GLenum = 0x00000001;
#[allow(dead_code, non_upper_case_globals)] pub const FRONT_LEFT_EXT: types::GLenum = 0x20DE;
#[allow(dead_code, non_upper_case_globals)] pub const FRONT_RIGHT_BUFFER_BIT: types::GLenum = 0x00000002;
#[allow(dead_code, non_upper_case_globals)] pub const FRONT_RIGHT_EXT: types::GLenum = 0x20DF;
#[allow(dead_code, non_upper_case_globals)] pub const GRAY_SCALE: types::GLenum = 0x8006;
#[allow(dead_code, non_upper_case_globals)] pub const GREEN_SIZE: types::GLenum = 9;
#[allow(dead_code, non_upper_case_globals)] pub const HEIGHT: types::GLenum = 0x801E;
#[allow(dead_code, non_upper_case_globals)] pub const LARGEST_PBUFFER: types::GLenum = 0x801C;
#[allow(dead_code, non_upper_case_globals)] pub const LEVEL: types::GLenum = 3;
#[allow(dead_code, non_upper_case_globals)] pub const MAX_PBUFFER_HEIGHT: types::GLenum = 0x8017;
#[allow(dead_code, non_upper_case_globals)] pub const MAX_PBUFFER_PIXELS: types::GLenum = 0x8018;
#[allow(dead_code, non_upper_case_globals)] pub const MAX_PBUFFER_WIDTH: types::GLenum = 0x8016;
#[allow(dead_code, non_upper_case_globals)] pub const MIPMAP_TEXTURE_EXT: types::GLenum = 0x20D7;
#[allow(dead_code, non_upper_case_globals)] pub const NONE: types::GLenum = 0x8000;
#[allow(dead_code, non_upper_case_globals)] pub const NON_CONFORMANT_CONFIG: types::GLenum = 0x800D;
#[allow(dead_code, non_upper_case_globals)] pub const NO_EXTENSION: types::GLenum = 3;
#[allow(dead_code, non_upper_case_globals)] pub const PBUFFER: types::GLenum = 0x8023;
#[allow(dead_code, non_upper_case_globals)] pub const PBUFFER_BIT: types::GLenum = 0x00000004;
#[allow(dead_code, non_upper_case_globals)] pub const PBUFFER_CLOBBER_MASK: types::GLenum = 0x08000000;
#[allow(dead_code, non_upper_case_globals)] pub const PBUFFER_HEIGHT: types::GLenum = 0x8040;
#[allow(dead_code, non_upper_case_globals)] pub const PBUFFER_WIDTH: types::GLenum = 0x8041;
#[allow(dead_code, non_upper_case_globals)] pub const PIXMAP_BIT: types::GLenum = 0x00000002;
#[allow(dead_code, non_upper_case_globals)] pub const PRESERVED_CONTENTS: types::GLenum = 0x801B;
#[allow(dead_code, non_upper_case_globals)] pub const PSEUDO_COLOR: types::GLenum = 0x8004;
#[allow(dead_code, non_upper_case_globals)] pub const PbufferClobber: types::GLenum = 0;
#[allow(dead_code, non_upper_case_globals)] pub const RED_SIZE: types::GLenum = 8;
#[allow(dead_code, non_upper_case_globals)] pub const RENDER_TYPE: types::GLenum = 0x8011;
#[allow(dead_code, non_upper_case_globals)] pub const RGBA: types::GLenum = 4;
#[allow(dead_code, non_upper_case_globals)] pub const RGBA_BIT: types::GLenum = 0x00000001;
#[allow(dead_code, non_upper_case_globals)] pub const RGBA_TYPE: types::GLenum = 0x8014;
#[allow(dead_code, non_upper_case_globals)] pub const SAMPLES: types::GLenum = 100001;
#[allow(dead_code, non_upper_case_globals)] pub const SAMPLE_BUFFERS: types::GLenum = 100000;
#[allow(dead_code, non_upper_case_globals)] pub const SAVED: types::GLenum = 0x8021;
#[allow(dead_code, non_upper_case_globals)] pub const SCREEN: types::GLenum = 0x800C;
#[allow(dead_code, non_upper_case_globals)] pub const SLOW_CONFIG: types::GLenum = 0x8001;
#[allow(dead_code, non_upper_case_globals)] pub const STATIC_COLOR: types::GLenum = 0x8005;
#[allow(dead_code, non_upper_case_globals)] pub const STATIC_GRAY: types::GLenum = 0x8007;
#[allow(dead_code, non_upper_case_globals)] pub const STENCIL_BUFFER_BIT: types::GLenum = 0x00000040;
#[allow(dead_code, non_upper_case_globals)] pub const STENCIL_SIZE: types::GLenum = 13;
#[allow(dead_code, non_upper_case_globals)] pub const STEREO: types::GLenum = 6;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_1D_BIT_EXT: types::GLenum = 0x00000001;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_1D_EXT: types::GLenum = 0x20DB;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_2D_BIT_EXT: types::GLenum = 0x00000002;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_2D_EXT: types::GLenum = 0x20DC;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_FORMAT_EXT: types::GLenum = 0x20D5;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_FORMAT_NONE_EXT: types::GLenum = 0x20D8;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_FORMAT_RGBA_EXT: types::GLenum = 0x20DA;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_FORMAT_RGB_EXT: types::GLenum = 0x20D9;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_RECTANGLE_BIT_EXT: types::GLenum = 0x00000004;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_RECTANGLE_EXT: types::GLenum = 0x20DD;
#[allow(dead_code, non_upper_case_globals)] pub const TEXTURE_TARGET_EXT: types::GLenum = 0x20D6;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_ALPHA_VALUE: types::GLenum = 0x28;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_BLUE_VALUE: types::GLenum = 0x27;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_GREEN_VALUE: types::GLenum = 0x26;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_INDEX: types::GLenum = 0x8009;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_INDEX_VALUE: types::GLenum = 0x24;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_RED_VALUE: types::GLenum = 0x25;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_RGB: types::GLenum = 0x8008;
#[allow(dead_code, non_upper_case_globals)] pub const TRANSPARENT_TYPE: types::GLenum = 0x23;
#[allow(dead_code, non_upper_case_globals)] pub const TRUE_COLOR: types::GLenum = 0x8002;
#[allow(dead_code, non_upper_case_globals)] pub const USE_GL: types::GLenum = 1;
#[allow(dead_code, non_upper_case_globals)] pub const VENDOR: types::GLenum = 0x1;
#[allow(dead_code, non_upper_case_globals)] pub const VERSION: types::GLenum = 0x2;
#[allow(dead_code, non_upper_case_globals)] pub const VISUAL_ID: types::GLenum = 0x800B;
#[allow(dead_code, non_upper_case_globals)] pub const WIDTH: types::GLenum = 0x801D;
#[allow(dead_code, non_upper_case_globals)] pub const WINDOW: types::GLenum = 0x8022;
#[allow(dead_code, non_upper_case_globals)] pub const WINDOW_BIT: types::GLenum = 0x00000001;
#[allow(dead_code, non_upper_case_globals)] pub const X_RENDERABLE: types::GLenum = 0x8012;
#[allow(dead_code, non_upper_case_globals)] pub const X_VISUAL_TYPE: types::GLenum = 0x22;
#[allow(dead_code, non_upper_case_globals)] pub const Y_INVERTED_EXT: types::GLenum = 0x20D4;

        #[allow(non_snake_case, unused_variables, dead_code)]
        extern "system" {
#[link_name="glXBindTexImageEXT"]
            pub fn BindTexImageEXT(dpy: *mut types::Display, drawable: types::GLXDrawable, buffer: __gl_imports::raw::c_int, attrib_list: *const __gl_imports::raw::c_int) -> ();
#[link_name="glXChooseFBConfig"]
            pub fn ChooseFBConfig(dpy: *mut types::Display, screen: __gl_imports::raw::c_int, attrib_list: *const __gl_imports::raw::c_int, nelements: *mut __gl_imports::raw::c_int) -> *mut types::GLXFBConfig;
#[link_name="glXChooseVisual"]
            pub fn ChooseVisual(dpy: *mut types::Display, screen: __gl_imports::raw::c_int, attribList: *mut __gl_imports::raw::c_int) -> *mut types::XVisualInfo;
#[link_name="glXCopyContext"]
            pub fn CopyContext(dpy: *mut types::Display, src: types::GLXContext, dst: types::GLXContext, mask: __gl_imports::raw::c_ulong) -> ();
#[link_name="glXCreateContext"]
            pub fn CreateContext(dpy: *mut types::Display, vis: *mut types::XVisualInfo, shareList: types::GLXContext, direct: types::Bool) -> types::GLXContext;
#[link_name="glXCreateGLXPixmap"]
            pub fn CreateGLXPixmap(dpy: *mut types::Display, visual: *mut types::XVisualInfo, pixmap: types::Pixmap) -> types::GLXPixmap;
#[link_name="glXCreateNewContext"]
            pub fn CreateNewContext(dpy: *mut types::Display, config: types::GLXFBConfig, render_type: __gl_imports::raw::c_int, share_list: types::GLXContext, direct: types::Bool) -> types::GLXContext;
#[link_name="glXCreatePbuffer"]
            pub fn CreatePbuffer(dpy: *mut types::Display, config: types::GLXFBConfig, attrib_list: *const __gl_imports::raw::c_int) -> types::GLXPbuffer;
#[link_name="glXCreatePixmap"]
            pub fn CreatePixmap(dpy: *mut types::Display, config: types::GLXFBConfig, pixmap: types::Pixmap, attrib_list: *const __gl_imports::raw::c_int) -> types::GLXPixmap;
#[link_name="glXCreateWindow"]
            pub fn CreateWindow(dpy: *mut types::Display, config: types::GLXFBConfig, win: types::Window, attrib_list: *const __gl_imports::raw::c_int) -> types::GLXWindow;
#[link_name="glXDestroyContext"]
            pub fn DestroyContext(dpy: *mut types::Display, ctx: types::GLXContext) -> ();
#[link_name="glXDestroyGLXPixmap"]
            pub fn DestroyGLXPixmap(dpy: *mut types::Display, pixmap: types::GLXPixmap) -> ();
#[link_name="glXDestroyPbuffer"]
            pub fn DestroyPbuffer(dpy: *mut types::Display, pbuf: types::GLXPbuffer) -> ();
#[link_name="glXDestroyPixmap"]
            pub fn DestroyPixmap(dpy: *mut types::Display, pixmap: types::GLXPixmap) -> ();
#[link_name="glXDestroyWindow"]
            pub fn DestroyWindow(dpy: *mut types::Display, win: types::GLXWindow) -> ();
#[link_name="glXGetClientString"]
            pub fn GetClientString(dpy: *mut types::Display, name: __gl_imports::raw::c_int) -> *const __gl_imports::raw::c_char;
#[link_name="glXGetConfig"]
            pub fn GetConfig(dpy: *mut types::Display, visual: *mut types::XVisualInfo, attrib: __gl_imports::raw::c_int, value: *mut __gl_imports::raw::c_int) -> __gl_imports::raw::c_int;
#[link_name="glXGetCurrentContext"]
            pub fn GetCurrentContext() -> types::GLXContext;
#[link_name="glXGetCurrentDisplay"]
            pub fn GetCurrentDisplay() -> *mut types::Display;
#[link_name="glXGetCurrentDrawable"]
            pub fn GetCurrentDrawable() -> types::GLXDrawable;
#[link_name="glXGetCurrentReadDrawable"]
            pub fn GetCurrentReadDrawable() -> types::GLXDrawable;
#[link_name="glXGetFBConfigAttrib"]
            pub fn GetFBConfigAttrib(dpy: *mut types::Display, config: types::GLXFBConfig, attribute: __gl_imports::raw::c_int, value: *mut __gl_imports::raw::c_int) -> __gl_imports::raw::c_int;
#[link_name="glXGetFBConfigs"]
            pub fn GetFBConfigs(dpy: *mut types::Display, screen: __gl_imports::raw::c_int, nelements: *mut __gl_imports::raw::c_int) -> *mut types::GLXFBConfig;
#[link_name="glXGetProcAddress"]
            pub fn GetProcAddress(procName: *const types::GLubyte) -> types::__GLXextFuncPtr;
#[link_name="glXGetSelectedEvent"]
            pub fn GetSelectedEvent(dpy: *mut types::Display, draw: types::GLXDrawable, event_mask: *mut __gl_imports::raw::c_ulong) -> ();
#[link_name="glXGetVisualFromFBConfig"]
            pub fn GetVisualFromFBConfig(dpy: *mut types::Display, config: types::GLXFBConfig) -> *mut types::XVisualInfo;
#[link_name="glXIsDirect"]
            pub fn IsDirect(dpy: *mut types::Display, ctx: types::GLXContext) -> types::Bool;
#[link_name="glXMakeContextCurrent"]
            pub fn MakeContextCurrent(dpy: *mut types::Display, draw: types::GLXDrawable, read: types::GLXDrawable, ctx: types::GLXContext) -> types::Bool;
#[link_name="glXMakeCurrent"]
            pub fn MakeCurrent(dpy: *mut types::Display, drawable: types::GLXDrawable, ctx: types::GLXContext) -> types::Bool;
#[link_name="glXQueryContext"]
            pub fn QueryContext(dpy: *mut types::Display, ctx: types::GLXContext, attribute: __gl_imports::raw::c_int, value: *mut __gl_imports::raw::c_int) -> __gl_imports::raw::c_int;
#[link_name="glXQueryDrawable"]
            pub fn QueryDrawable(dpy: *mut types::Display, draw: types::GLXDrawable, attribute: __gl_imports::raw::c_int, value: *mut __gl_imports::raw::c_uint) -> ();
#[link_name="glXQueryExtension"]
            pub fn QueryExtension(dpy: *mut types::Display, errorb: *mut __gl_imports::raw::c_int, event: *mut __gl_imports::raw::c_int) -> types::Bool;
#[link_name="glXQueryExtensionsString"]
            pub fn QueryExtensionsString(dpy: *mut types::Display, screen: __gl_imports::raw::c_int) -> *const __gl_imports::raw::c_char;
#[link_name="glXQueryServerString"]
            pub fn QueryServerString(dpy: *mut types::Display, screen: __gl_imports::raw::c_int, name: __gl_imports::raw::c_int) -> *const __gl_imports::raw::c_char;
#[link_name="glXQueryVersion"]
            pub fn QueryVersion(dpy: *mut types::Display, maj: *mut __gl_imports::raw::c_int, min: *mut __gl_imports::raw::c_int) -> types::Bool;
#[link_name="glXReleaseTexImageEXT"]
            pub fn ReleaseTexImageEXT(dpy: *mut types::Display, drawable: types::GLXDrawable, buffer: __gl_imports::raw::c_int) -> ();
#[link_name="glXSelectEvent"]
            pub fn SelectEvent(dpy: *mut types::Display, draw: types::GLXDrawable, event_mask: __gl_imports::raw::c_ulong) -> ();
#[link_name="glXSwapBuffers"]
            pub fn SwapBuffers(dpy: *mut types::Display, drawable: types::GLXDrawable) -> ();
#[link_name="glXUseXFont"]
            pub fn UseXFont(font: types::Font, first: __gl_imports::raw::c_int, count: __gl_imports::raw::c_int, list: __gl_imports::raw::c_int) -> ();
#[link_name="glXWaitGL"]
            pub fn WaitGL() -> ();
#[link_name="glXWaitX"]
            pub fn WaitX() -> ();
}