#![allow(unused_imports)]
#![allow(deprecated)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(missing_docs)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::type_complexity)]
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::identity_op)]
#![allow(clippy::missing_safety_doc)]
#![allow(clippy::doc_lazy_continuation)]
#![allow(rustdoc::broken_intra_doc_links)]
#![allow(rustdoc::bare_urls)]
#![allow(rustdoc::invalid_html_tags)]
#[link(name = "OpenGL", kind = "framework")]
extern "C" {}
#[cfg(feature = "CGLCurrent")]
#[path = "CGLCurrent.rs"]
mod __CGLCurrent;
#[cfg(feature = "CGLDevice")]
#[path = "CGLDevice.rs"]
mod __CGLDevice;
#[cfg(feature = "CGLRenderers")]
#[path = "CGLRenderers.rs"]
mod __CGLRenderers;
#[cfg(feature = "CGLTypes")]
#[path = "CGLTypes.rs"]
mod __CGLTypes;
#[cfg(feature = "IOSurface")]
#[path = "IOSurface.rs"]
mod __IOSurface;
#[cfg(all(feature = "CGLCurrent", feature = "CGLTypes"))]
pub use self::__CGLCurrent::CGLGetCurrentContext;
#[cfg(all(feature = "CGLCurrent", feature = "CGLTypes"))]
pub use self::__CGLCurrent::CGLSetCurrentContext;
#[cfg(all(feature = "CGLDevice", feature = "CGLTypes"))]
pub use self::__CGLDevice::CGLGetShareGroup;
#[cfg(feature = "CGLDevice")]
pub use self::__CGLDevice::CGLShareGroupObj;
#[cfg(feature = "CGLDevice")]
pub use self::__CGLDevice::CGLShareGroupRec;
#[cfg(feature = "CGLDevice")]
pub(crate) use self::__CGLDevice::_cl_device_id;
#[cfg(feature = "CGLDevice")]
pub use self::__CGLDevice::cl_device_id;
#[cfg(feature = "CGLDevice")]
pub use self::__CGLDevice::CGLGetDeviceFromGLRenderer;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererATIRadeon8500ID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererATIRadeon9700ID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererATIRadeonID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererATIRadeonX1000ID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererATIRadeonX2000ID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererATIRadeonX3000ID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererATIRadeonX4000ID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererATIRage128ID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererATIRageProID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererAppleSWID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererGeForce2MXID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererGeForce3ID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererGeForce8xxxID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererGeForceFXID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererGeForceID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererGenericFloatID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererGenericID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererIDMatchingMask;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererIntel900ID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererIntelHD4000ID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererIntelHD5000ID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererIntelHDID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererIntelX3100ID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererMesa3DFXID;
#[cfg(feature = "CGLRenderers")]
pub use self::__CGLRenderers::kCGLRendererVTBladeXP2ID;
#[cfg(feature = "CGLTypes")]
pub(crate) use self::__CGLTypes::_CGLPBufferObject;
#[cfg(feature = "CGLTypes")]
pub(crate) use self::__CGLTypes::_CGLPixelFormatObject;
#[cfg(feature = "CGLTypes")]
pub(crate) use self::__CGLTypes::_CGLRendererInfoObject;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL0Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL10Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL128Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL12Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL16Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL1Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL24Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL2Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL32Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL3Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL48Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL4Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL5Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL64Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL6Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL8Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGL96Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLARGB12121212Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLARGB1555Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLARGB16161616Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLARGB2101010Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLARGB4444Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLARGB8888Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLDoubleBufferBit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLMonoscopicBit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLMultisampleBit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGB101010Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGB101010_A8Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGB121212Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGB161616Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGB444A8Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGB444Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGB555A8Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGB555Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGB565A8Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGB565Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGB888A8Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGB888Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGBA16161616Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGBAFloat128Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGBAFloat256Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGBAFloat64Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGBFloat128Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGBFloat256Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLRGBFloat64Bit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLSingleBufferBit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLStereoscopicBit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLSupersampleBit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::kCGLTripleBufferBit;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLCPContextPriorityRequest;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLContextEnable;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLContextObj;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLContextParameter;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLError;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLGPURestartStatus;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLGlobalOption;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLOpenGLProfile;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLPBufferObj;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLPixelFormatAttribute;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLPixelFormatObj;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLRendererInfoObj;
#[cfg(feature = "CGLTypes")]
pub use self::__CGLTypes::CGLRendererProperty;
#[cfg(all(
feature = "CGLTypes",
feature = "IOSurface",
feature = "objc2-io-surface"
))]
pub use self::__IOSurface::CGLTexImageIOSurface2D;
use core::ffi::*;
use core::ptr::NonNull;
use crate::*;
pub const CGL_VERSION_1_0: c_uint = 1;
pub const CGL_VERSION_1_1: c_uint = 1;
pub const CGL_VERSION_1_2: c_uint = 1;
pub const CGL_VERSION_1_3: c_uint = 1;
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLChoosePixelFormat(
attribs: NonNull<CGLPixelFormatAttribute>,
pix: NonNull<CGLPixelFormatObj>,
npix: NonNull<GLint>,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLDestroyPixelFormat(pix: CGLPixelFormatObj) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLDescribePixelFormat(
pix: CGLPixelFormatObj,
pix_num: GLint,
attrib: CGLPixelFormatAttribute,
value: NonNull<GLint>,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLReleasePixelFormat(pix: CGLPixelFormatObj);
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLRetainPixelFormat(pix: CGLPixelFormatObj) -> CGLPixelFormatObj;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLGetPixelFormatRetainCount(pix: CGLPixelFormatObj) -> GLuint;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLQueryRendererInfo(
display_mask: GLuint,
rend: NonNull<CGLRendererInfoObj>,
nrend: NonNull<GLint>,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLDestroyRendererInfo(rend: CGLRendererInfoObj) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLDescribeRenderer(
rend: CGLRendererInfoObj,
rend_num: GLint,
prop: CGLRendererProperty,
value: *mut GLint,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLCreateContext(
pix: CGLPixelFormatObj,
share: CGLContextObj,
ctx: NonNull<CGLContextObj>,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLDestroyContext(ctx: CGLContextObj) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLCopyContext(src: CGLContextObj, dst: CGLContextObj, mask: GLbitfield) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLRetainContext(ctx: CGLContextObj) -> CGLContextObj;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLReleaseContext(ctx: CGLContextObj);
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLGetContextRetainCount(ctx: CGLContextObj) -> GLuint;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLGetPixelFormat(ctx: CGLContextObj) -> CGLPixelFormatObj;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLCreatePBuffer(
width: GLsizei,
height: GLsizei,
target: GLenum,
internal_format: GLenum,
max_level: GLint,
pbuffer: NonNull<CGLPBufferObj>,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLDestroyPBuffer(pbuffer: CGLPBufferObj) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLDescribePBuffer(
obj: CGLPBufferObj,
width: NonNull<GLsizei>,
height: NonNull<GLsizei>,
target: NonNull<GLenum>,
internal_format: NonNull<GLenum>,
mipmap: NonNull<GLint>,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLTexImagePBuffer(
ctx: CGLContextObj,
pbuffer: CGLPBufferObj,
source: GLenum,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLRetainPBuffer(pbuffer: CGLPBufferObj) -> CGLPBufferObj;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLReleasePBuffer(pbuffer: CGLPBufferObj);
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLGetPBufferRetainCount(pbuffer: CGLPBufferObj) -> GLuint;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLSetOffScreen(
ctx: CGLContextObj,
width: GLsizei,
height: GLsizei,
rowbytes: GLint,
baseaddr: NonNull<c_void>,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLGetOffScreen(
ctx: CGLContextObj,
width: NonNull<GLsizei>,
height: NonNull<GLsizei>,
rowbytes: NonNull<GLint>,
baseaddr: NonNull<*mut c_void>,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLSetFullScreen(ctx: CGLContextObj) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLSetFullScreenOnDisplay(ctx: CGLContextObj, display_mask: GLuint) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLSetPBuffer(
ctx: CGLContextObj,
pbuffer: CGLPBufferObj,
face: GLenum,
level: GLint,
screen: GLint,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLGetPBuffer(
ctx: CGLContextObj,
pbuffer: NonNull<CGLPBufferObj>,
face: NonNull<GLenum>,
level: NonNull<GLint>,
screen: NonNull<GLint>,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLClearDrawable(ctx: CGLContextObj) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLFlushDrawable(ctx: CGLContextObj) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLEnable(ctx: CGLContextObj, pname: CGLContextEnable) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLDisable(ctx: CGLContextObj, pname: CGLContextEnable) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLIsEnabled(
ctx: CGLContextObj,
pname: CGLContextEnable,
enable: NonNull<GLint>,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLSetParameter(
ctx: CGLContextObj,
pname: CGLContextParameter,
params: NonNull<GLint>,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLGetParameter(
ctx: CGLContextObj,
pname: CGLContextParameter,
params: NonNull<GLint>,
) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLSetVirtualScreen(ctx: CGLContextObj, screen: GLint) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLGetVirtualScreen(ctx: CGLContextObj, screen: NonNull<GLint>) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLUpdateContext(ctx: CGLContextObj) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLSetGlobalOption(pname: CGLGlobalOption, params: *const GLint) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLGetGlobalOption(pname: CGLGlobalOption, params: NonNull<GLint>) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLSetOption(pname: CGLGlobalOption, param: GLint) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLGetOption(pname: CGLGlobalOption, param: NonNull<GLint>) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLLockContext(ctx: CGLContextObj) -> CGLError;
}
extern "C-unwind" {
#[cfg(feature = "CGLTypes")]
pub fn CGLUnlockContext(ctx: CGLContextObj) -> CGLError;
}
extern "C-unwind" {
pub fn CGLGetVersion(majorvers: *mut GLint, minorvers: *mut GLint);
}
#[cfg(feature = "CGLTypes")]
#[inline]
pub unsafe extern "C-unwind" fn CGLErrorString(error: CGLError) -> NonNull<c_char> {
extern "C-unwind" {
fn CGLErrorString(error: CGLError) -> Option<NonNull<c_char>>;
}
let ret = unsafe { CGLErrorString(error) };
ret.expect("function was marked as returning non-null, but actually returned NULL")
}