1#![no_std]
2#![allow(non_camel_case_types)]
3
4pub use core::ffi::c_void;
7
8#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
15#[repr(transparent)]
16pub struct GLboolean(core::ffi::c_uchar);
17impl GLboolean {
18 pub const FALSE: Self = Self(false as _);
19 pub const TRUE: Self = Self(true as _);
20}
21impl From<bool> for GLboolean {
22 #[inline]
23 #[must_use]
24 fn from(b: bool) -> Self {
25 Self(b as _)
26 }
27}
28impl From<GLboolean> for bool {
29 #[inline]
30 #[must_use]
31 fn from(b: GLboolean) -> Self {
32 b.0 != 0
33 }
34}
35impl From<GLboolean> for GLenum {
36 #[inline]
37 #[must_use]
38 fn from(b: GLboolean) -> Self {
39 GLenum::from(bool::from(b))
40 }
41}
42impl core::fmt::Debug for GLboolean {
43 #[inline]
44 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
45 core::fmt::Debug::fmt(&bool::from(*self), f)
46 }
47}
48impl core::fmt::Display for GLboolean {
49 #[inline]
50 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
51 core::fmt::Display::fmt(&bool::from(*self), f)
52 }
53}
54
55pub type GLenum = core::ffi::c_uint;
57
58pub type GLbitfield = core::ffi::c_uint;
60
61pub type GLvoid = c_void;
63
64pub type GLbyte = i8;
66
67pub type GLubyte = u8;
69
70pub type GLshort = i16;
72
73pub type GLushort = u16;
75
76pub type GLint = core::ffi::c_int;
78
79pub type GLuint = core::ffi::c_uint;
81
82pub type GLclampx = i32;
84
85pub type GLsizei = core::ffi::c_int;
87
88pub type GLfloat = core::ffi::c_float;
90
91pub type GLclampf = core::ffi::c_float;
93
94pub type GLdouble = core::ffi::c_double;
96
97pub type GLclampd = core::ffi::c_double;
99
100pub type GLeglClientBufferEXT = *mut c_void;
102
103pub type GLeglImageOES = *mut c_void;
105
106pub type GLchar = core::ffi::c_char;
108
109pub type GLcharARB = core::ffi::c_char;
111
112#[cfg(any(target_os = "ios", target_os = "macos"))]
120pub type GLhandleARB = *mut c_void;
121
122#[cfg(not(any(target_os = "ios", target_os = "macos")))]
130pub type GLhandleARB = GLuint;
131
132pub type GLhalf = u16;
134
135pub type GLhalfARB = u16;
137
138pub type GLfixed = i32;
140
141pub type GLintptr = isize;
143
144pub type GLintptrARB = isize;
146
147pub type GLsizeiptr = isize;
149
150pub type GLsizeiptrARB = isize;
152
153pub type GLint64 = i64;
155
156pub type GLint64EXT = i64;
158
159pub type GLuint64 = u64;
161
162pub type GLuint64EXT = u64;
164
165pub type GLsync = *mut c_void;
167
168pub type _cl_context = c_void;
170
171pub type _cl_event = c_void;
173
174pub type GLDEBUGPROC = Option<
186 unsafe extern "system" fn(GLenum, GLenum, GLuint, GLenum, GLsizei, *const GLchar, *const c_void),
187>;
188
189pub type GLDEBUGPROCARB = Option<
201 unsafe extern "system" fn(GLenum, GLenum, GLuint, GLenum, GLsizei, *const GLchar, *const c_void),
202>;
203
204pub type GLDEBUGPROCKHR = Option<
216 unsafe extern "system" fn(GLenum, GLenum, GLuint, GLenum, GLsizei, *const GLchar, *const c_void),
217>;
218
219pub type GLDEBUGPROCAMD =
230 Option<unsafe extern "system" fn(GLuint, GLenum, GLenum, GLsizei, *const GLchar, *mut c_void)>;
231
232pub type GLhalfNV = core::ffi::c_ushort;
234
235pub type GLvdpauSurfaceNV = isize;
237
238pub type GLVULKANPROCNV = Option<unsafe extern "system" fn()>;