pub struct CVOpenGLBufferPool { /* private fields */ }CVOpenGLBufferPool only.Expand description
Implementations§
Source§impl CVOpenGLBufferPool
impl CVOpenGLBufferPool
Sourcepub unsafe fn create(
allocator: Option<&CFAllocator>,
pool_attributes: Option<&CFDictionary>,
open_gl_buffer_attributes: Option<&CFDictionary>,
pool_out: NonNull<*mut CVOpenGLBufferPool>,
) -> CVReturn
👎Deprecated: OpenGL/OpenGLES is no longer supported. Use Metal APIs instead. (Define COREVIDEO_SILENCE_GL_DEPRECATION to silence these warnings)Available on crate feature CVReturn only.
pub unsafe fn create( allocator: Option<&CFAllocator>, pool_attributes: Option<&CFDictionary>, open_gl_buffer_attributes: Option<&CFDictionary>, pool_out: NonNull<*mut CVOpenGLBufferPool>, ) -> CVReturn
CVReturn only.Creates a new OpenGL Buffer pool.
Equivalent to CFRelease, but NULL safe
Parameter allocator: The CFAllocatorRef to use for allocating this buffer pool. May be NULL.
Parameter poolAttributes: A CFDictionaryRef containing the attributes to be used for the pool itself.
Parameter openGLBufferAttributes: A CFDictionaryRef containing the attributes to be used for creating new OpenGLBuffers within the pool.
Parameter poolOut: The newly created pool will be placed here
Returns: Returns kCVReturnSuccess on success
§Safety
pool_attributesgenerics must be of the correct type.open_gl_buffer_attributesgenerics must be of the correct type.pool_outmust be a valid pointer.
Sourcepub fn attributes(&self) -> Option<CFRetained<CFDictionary>>
👎Deprecated: OpenGL/OpenGLES is no longer supported. Use Metal APIs instead. (Define COREVIDEO_SILENCE_GL_DEPRECATION to silence these warnings)
pub fn attributes(&self) -> Option<CFRetained<CFDictionary>>
Returns the pool attributes dictionary for a CVOpenGLBufferPool
Parameter pool: The CVOpenGLBufferPoolRef to retrieve the attributes from
Returns: Returns the pool attributes dictionary, or NULL on failure.
Sourcepub fn open_gl_buffer_attributes(&self) -> Option<CFRetained<CFDictionary>>
👎Deprecated: OpenGL/OpenGLES is no longer supported. Use Metal APIs instead. (Define COREVIDEO_SILENCE_GL_DEPRECATION to silence these warnings)
pub fn open_gl_buffer_attributes(&self) -> Option<CFRetained<CFDictionary>>
Returns the attributes of OpenGL buffers that will be created from this pool.
This function is provided for those cases where you may need to know some information about the buffers that will be created up front.
Parameter pool: The CVOpenGLBufferPoolRef to retrieve the attributes from
Returns: Returns the OpenGL buffer attributes dictionary, or NULL on failure.
Sourcepub unsafe fn create_open_gl_buffer(
allocator: Option<&CFAllocator>,
open_gl_buffer_pool: &CVOpenGLBufferPool,
open_gl_buffer_out: NonNull<*mut CVOpenGLBuffer>,
) -> CVReturn
👎Deprecated: OpenGL/OpenGLES is no longer supported. Use Metal APIs instead. (Define COREVIDEO_SILENCE_GL_DEPRECATION to silence these warnings)Available on crate features CVBuffer and CVImageBuffer and CVOpenGLBuffer and CVReturn only.
pub unsafe fn create_open_gl_buffer( allocator: Option<&CFAllocator>, open_gl_buffer_pool: &CVOpenGLBufferPool, open_gl_buffer_out: NonNull<*mut CVOpenGLBuffer>, ) -> CVReturn
CVBuffer and CVImageBuffer and CVOpenGLBuffer and CVReturn only.Creates a new OpenGLBuffer object from the pool.
The function creates a new CVOpenGLBuffer with the default attachments using the OpenGL buffer attributes specifed during pool creation.
Parameter allocator: The CFAllocatorRef to use for creating the OpenGL buffer. May be NULL.
Parameter openGLBufferPool: The CVOpenGLBufferPool that should create the new CVOpenGLBuffer.
Parameter openGLBufferOut: The newly created OpenGL buffer will be placed here
Returns: Returns kCVReturnSuccess on success
§Safety
open_gl_buffer_out must be a valid pointer.
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Attempt to downcast the type to that of type T.
This is the reference-variant. Use CFRetained::downcast if you
want to convert a retained type. See also ConcreteType for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumbers, small CFStrings etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for CVOpenGLBufferPool
impl AsRef<AnyObject> for CVOpenGLBufferPool
Source§impl AsRef<CFType> for CVOpenGLBufferPool
impl AsRef<CFType> for CVOpenGLBufferPool
Source§impl AsRef<CVOpenGLBufferPool> for CVOpenGLBufferPool
impl AsRef<CVOpenGLBufferPool> for CVOpenGLBufferPool
Source§impl Borrow<AnyObject> for CVOpenGLBufferPool
impl Borrow<AnyObject> for CVOpenGLBufferPool
Source§impl Borrow<CFType> for CVOpenGLBufferPool
impl Borrow<CFType> for CVOpenGLBufferPool
Source§impl ConcreteType for CVOpenGLBufferPool
impl ConcreteType for CVOpenGLBufferPool
Source§impl Debug for CVOpenGLBufferPool
impl Debug for CVOpenGLBufferPool
Source§impl Deref for CVOpenGLBufferPool
impl Deref for CVOpenGLBufferPool
Source§impl Hash for CVOpenGLBufferPool
impl Hash for CVOpenGLBufferPool
Source§impl Message for CVOpenGLBufferPool
impl Message for CVOpenGLBufferPool
Source§impl PartialEq for CVOpenGLBufferPool
impl PartialEq for CVOpenGLBufferPool
Source§impl RefEncode for CVOpenGLBufferPool
impl RefEncode for CVOpenGLBufferPool
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for CVOpenGLBufferPool
impl Type for CVOpenGLBufferPool
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
core-foundation crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
core-foundation crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read more