You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: glutin/src/api/egl/surface.rs
+177-30
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,20 @@
2
2
3
3
use std::marker::PhantomData;
4
4
use std::num::NonZeroU32;
5
+
use std::ops::Deref;
5
6
use std::{ffi, fmt};
6
7
7
-
use glutin_egl_sys::egl;
8
-
use glutin_egl_sys::egl::types::{EGLAttrib,EGLSurface,EGLint};
8
+
use glutin_egl_sys::egl::types::{EGLAttrib,EGLSurface};
9
+
use glutin_egl_sys::egl::{self};
10
+
use glutin_egl_sys::{EGLenum,EGLint};
9
11
use raw_window_handle::RawWindowHandle;
10
12
#[cfg(wayland_platform)]
11
13
use wayland_sys::{egl::*, ffi_dispatch};
12
14
13
15
usecrate::api::egl::display::EglDisplay;
14
16
usecrate::config::GetGlConfig;
17
+
#[cfg(doc)]
18
+
usecrate::display::GetDisplayExtensions;
15
19
usecrate::display::GetGlDisplay;
16
20
usecrate::error::{ErrorKind,Result};
17
21
usecrate::prelude::*;
@@ -28,6 +32,124 @@ use super::display::Display;
28
32
/// Hint for the attribute list size.
29
33
constATTR_SIZE_HINT:usize = 8;
30
34
35
+
/// Missing `EGL_EXT_gl_colorspace_bt2020_hlg` constant defined at <https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_gl_colorspace_bt2020_linear.txt>
/// Missing `EXT_gl_colorspace_display_p3_passthrough` constant defined at <https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_gl_colorspace_display_p3_passthrough.txt>
/// Possible color spaces for [`egl::GL_COLORSPACE`].
41
+
///
42
+
/// It is impossible to query whether a [`Config`] or [`Surface`] supports a
43
+
/// certain color space, only whether the [`Display`] might have it available
44
+
/// globally. Compare [`ColorSpace::egl_extension_name()`] against
45
+
/// [`GetDisplayExtensions::extensions()`] to get a hint of whether there will
46
+
/// be any support for it.
47
+
#[derive(Clone,Copy,Debug,Hash,PartialEq,Eq)]
48
+
pubenumColorSpace{
49
+
/// Use [`egl::GL_COLORSPACE_LINEAR`] from [`EGL_KHR_gl_colorspace`](https://registry.khronos.org/EGL/extensions/KHR/EGL_KHR_gl_colorspace.txt).
50
+
Linear,
51
+
/// Use [`egl::GL_COLORSPACE_SRGB`] from [`EGL_KHR_gl_colorspace`](https://registry.khronos.org/EGL/extensions/KHR/EGL_KHR_gl_colorspace.txt).
52
+
Srgb,
53
+
/// Use [`egl::GL_COLORSPACE_SCRGB_EXT`] from [`EGL_EXT_gl_colorspace_scrgb`](https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_gl_colorspace_scrgb.txt).
54
+
Scrgb,
55
+
/// Use [`egl::GL_COLORSPACE_SCRGB_LINEAR_EXT`] from [`EGL_EXT_gl_colorspace_scrgb_linear`](https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_gl_colorspace_scrgb_linear.txt).
56
+
ScrgbLinear,
57
+
/// Use [`egl::GL_COLORSPACE_DISPLAY_P3_EXT`] from [`EGL_EXT_gl_colorspace_display_p3`](https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_gl_colorspace_display_p3.txt).
58
+
DisplayP3,
59
+
/// Use [`egl::GL_COLORSPACE_DISPLAY_P3_LINEAR_EXT`] from [`EGL_EXT_gl_colorspace_display_p3_linear`](https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_gl_colorspace_display_p3.txt).
60
+
DisplayP3Linear,
61
+
/// Use [`EGL_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH_EXT`] from [`EGL_EXT_gl_colorspace_display_p3_passthrough`](https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_gl_colorspace_display_p3_passthrough.txt).
62
+
DisplayP3Passthrough,
63
+
/// Use [`EGL_GL_COLORSPACE_BT2020_HLG_EXT`] from [`EGL_EXT_gl_colorspace_bt2020_hlg`](https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_gl_colorspace_bt2020_linear.txt).
64
+
Bt2020Hlg,
65
+
/// Use [`egl::GL_COLORSPACE_BT2020_LINEAR_EXT`] from [`EGL_EXT_gl_colorspace_bt2020_linear`](https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_gl_colorspace_bt2020_linear.txt).
66
+
Bt2020Linear,
67
+
/// Use [`egl::GL_COLORSPACE_BT2020_PQ_EXT`] from [`EGL_EXT_gl_colorspace_bt2020_pq`](https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_gl_colorspace_bt2020_linear.txt).
0 commit comments