1#![warn(missing_docs)]
10
11#[macro_use]
12extern crate bitflags;
13#[allow(unused_imports)]
14#[macro_use]
15extern crate log;
16
17#[cfg(all(windows_platform, feature = "sm-angle"))]
18pub mod angle;
19pub(crate) mod base;
20#[cfg(macos_platform)]
21pub mod cgl;
22#[cfg(feature = "chains")]
23pub mod chains;
24pub mod connection;
25mod context;
26pub mod device;
27pub mod error;
28mod gl_utils;
29#[cfg(any(android_platform, ohos_platform))]
30pub mod hardware_buffer;
31mod info;
32pub mod macros;
33#[cfg(free_unix)]
34pub mod mesa_surfaceless;
35pub mod multi;
36mod renderbuffers;
37mod surface;
38#[cfg(all(x11_platform, not(wayland_default)))]
39pub mod unix;
40#[cfg(wayland_platform)]
41pub mod wayland;
42#[cfg(all(windows_platform, not(feature = "sm-no-wgl")))]
43pub mod wgl;
44#[cfg(x11_platform)]
45pub mod x11;
46
47#[cfg(all(windows_platform, angle_default))]
48pub use angle as default;
49#[cfg(macos_platform)]
50pub use cgl as default;
51#[cfg(any(android_platform, ohos_platform))]
52pub use hardware_buffer as default;
53#[cfg(all(x11_platform, not(wayland_default)))]
54pub use unix as default;
55#[cfg(wayland_default)]
56pub use wayland as default;
57#[cfg(all(windows_platform, not(angle_default)))]
58pub use wgl as default;
59
60pub use crate::context::{ContextAttributeFlags, ContextAttributes, ContextID};
61pub use crate::error::{Error, WindowingApiError};
62pub use crate::info::{GLApi, GLVersion};
63pub use crate::surface::{SurfaceAccess, SurfaceID, SurfaceInfo, SurfaceType, SystemSurfaceInfo};
64pub use default::connection::{Connection, NativeConnection};
65pub use default::context::{Context, ContextDescriptor, NativeContext};
66pub use default::device::{Adapter, Device, NativeDevice};
67pub use default::surface::{NativeWidget, Surface, SurfaceTexture};
68pub(crate) use glow::{self as gl, Context as Gl};
69pub(crate) use macros::implement_interfaces;
70
71#[cfg(target_os = "macos")]
73pub use base::io_surface::connection::Connection as SystemConnection;
74#[cfg(target_os = "macos")]
75pub use base::io_surface::device::{Adapter as SystemAdapter, Device as SystemDevice};
76#[cfg(target_os = "macos")]
77pub use base::io_surface::surface::Surface as SystemSurface;
78
79#[cfg(any(
80 target_os = "android",
81 target_env = "ohos",
82 all(target_os = "windows", feature = "sm-angle"),
83 unix
84))]
85#[allow(non_camel_case_types)]
86#[allow(clippy::all)]
87mod egl {
88 use std::os::raw::{c_long, c_void};
89 pub type khronos_utime_nanoseconds_t = khronos_uint64_t;
90 pub type khronos_uint64_t = u64;
91 pub type khronos_ssize_t = c_long;
92 pub type EGLint = i32;
93 pub type EGLNativeDisplayType = *const c_void;
94 pub type EGLNativePixmapType = *const c_void;
95 pub type EGLNativeWindowType = *const c_void;
96 pub type NativeDisplayType = EGLNativeDisplayType;
97 pub type NativePixmapType = EGLNativePixmapType;
98 pub type NativeWindowType = EGLNativeWindowType;
99 include!(concat!(env!("OUT_DIR"), "/egl_bindings.rs"));
100}