objc2_core_video/generated/
CVOpenGLTexture.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2_core_foundation::*;
5
6use crate::*;
7
8/// OpenGL texture based image buffer
9///
10/// See also [Apple's documentation](https://developer.apple.com/documentation/corevideo/cvopengltexture?language=objc)
11#[cfg(all(feature = "CVBuffer", feature = "CVImageBuffer"))]
12pub type CVOpenGLTexture = CVImageBuffer;
13
14#[deprecated = "OpenGL/OpenGLES is no longer supported. Use Metal APIs instead. (Define COREVIDEO_SILENCE_GL_DEPRECATION to silence these warnings)"]
15#[inline]
16pub extern "C-unwind" fn CVOpenGLTextureGetTypeID() -> CFTypeID {
17    extern "C-unwind" {
18        fn CVOpenGLTextureGetTypeID() -> CFTypeID;
19    }
20    unsafe { CVOpenGLTextureGetTypeID() }
21}
22
23/// Returns whether the image is flipped vertically or not.
24///
25/// Parameter `image`: Target CVOpenGLTexture
26///
27/// Returns: True if 0,0 in the texture is upper left, false if 0,0 is lower left
28#[cfg(all(feature = "CVBuffer", feature = "CVImageBuffer"))]
29#[deprecated = "OpenGL/OpenGLES is no longer supported. Use Metal APIs instead. (Define COREVIDEO_SILENCE_GL_DEPRECATION to silence these warnings)"]
30#[inline]
31pub unsafe extern "C-unwind" fn CVOpenGLTextureIsFlipped(image: &CVOpenGLTexture) -> bool {
32    extern "C-unwind" {
33        fn CVOpenGLTextureIsFlipped(image: &CVOpenGLTexture) -> Boolean;
34    }
35    let ret = unsafe { CVOpenGLTextureIsFlipped(image) };
36    ret != 0
37}