#[repr(C)]
pub struct QOpenGLFramebufferObjectFormat { /* private fields */ }
Expand description

The QOpenGLFramebufferObjectFormat class specifies the format of an OpenGL framebuffer object.

C++ class: QOpenGLFramebufferObjectFormat.

C++ documentation:

The QOpenGLFramebufferObjectFormat class specifies the format of an OpenGL framebuffer object.

A framebuffer object has several characteristics:

Note that the desired attachments or number of samples per pixels might not be supported by the hardware driver. Call QOpenGLFramebufferObject::format() after creating a QOpenGLFramebufferObject to find the exact format that was used to create the frame buffer object.

Implementations§

source§

impl QOpenGLFramebufferObjectFormat

source

pub unsafe fn attachment(&self) -> Attachment

Returns the configuration of the depth and stencil buffers attached to a framebuffer object. The default is QOpenGLFramebufferObject::NoAttachment.

Calls C++ function: QOpenGLFramebufferObject::Attachment QOpenGLFramebufferObjectFormat::attachment() const.

C++ documentation:

Returns the configuration of the depth and stencil buffers attached to a framebuffer object. The default is QOpenGLFramebufferObject::NoAttachment.

See also setAttachment().

source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QOpenGLFramebufferObjectFormat>> ) -> Ref<QOpenGLFramebufferObjectFormat>

Assigns other to this object.

Calls C++ function: QOpenGLFramebufferObjectFormat& QOpenGLFramebufferObjectFormat::operator=(const QOpenGLFramebufferObjectFormat& other).

C++ documentation:

Assigns other to this object.

source

pub unsafe fn internal_texture_format(&self) -> c_uint

Returns the internal format of a framebuffer object's texture or multisample framebuffer object's color buffer. The default is GL_RGBA8 on desktop OpenGL systems, and GL_RGBA on OpenGL/ES systems.

Calls C++ function: unsigned int QOpenGLFramebufferObjectFormat::internalTextureFormat() const.

C++ documentation:

Returns the internal format of a framebuffer object’s texture or multisample framebuffer object’s color buffer. The default is GL_RGBA8 on desktop OpenGL systems, and GL_RGBA on OpenGL/ES systems.

See also setInternalTextureFormat().

source

pub unsafe fn mipmap(&self) -> bool

Returns true if mipmapping is enabled.

Calls C++ function: bool QOpenGLFramebufferObjectFormat::mipmap() const.

C++ documentation:

Returns true if mipmapping is enabled.

See also setMipmap().

source

pub unsafe fn new() -> CppBox<QOpenGLFramebufferObjectFormat>

Creates a QOpenGLFramebufferObjectFormat object for specifying the format of an OpenGL framebuffer object.

Calls C++ function: [constructor] void QOpenGLFramebufferObjectFormat::QOpenGLFramebufferObjectFormat().

C++ documentation:

Creates a QOpenGLFramebufferObjectFormat object for specifying the format of an OpenGL framebuffer object.

By default the format specifies a non-multisample framebuffer object with no depth/stencil attachments, texture target GL_TEXTURE_2D, and internal format GL_RGBA8. On OpenGL/ES systems, the default internal format is GL_RGBA.

See also samples(), attachment(), and internalTextureFormat().

source

pub unsafe fn new_copy( other: impl CastInto<Ref<QOpenGLFramebufferObjectFormat>> ) -> CppBox<QOpenGLFramebufferObjectFormat>

Constructs a copy of other.

Calls C++ function: [constructor] void QOpenGLFramebufferObjectFormat::QOpenGLFramebufferObjectFormat(const QOpenGLFramebufferObjectFormat& other).

C++ documentation:

Constructs a copy of other.

source

pub unsafe fn samples(&self) -> c_int

Returns the number of samples per pixel if a framebuffer object is a multisample framebuffer object. Otherwise, returns 0. The default value is 0.

Calls C++ function: int QOpenGLFramebufferObjectFormat::samples() const.

C++ documentation:

Returns the number of samples per pixel if a framebuffer object is a multisample framebuffer object. Otherwise, returns 0. The default value is 0.

See also setSamples().

source

pub unsafe fn set_attachment(&self, attachment: Attachment)

Sets the attachment configuration of a framebuffer object to attachment.

Calls C++ function: void QOpenGLFramebufferObjectFormat::setAttachment(QOpenGLFramebufferObject::Attachment attachment).

C++ documentation:

Sets the attachment configuration of a framebuffer object to attachment.

See also attachment().

source

pub unsafe fn set_internal_texture_format( &self, internal_texture_format: c_uint )

Sets the internal format of a framebuffer object's texture or multisample framebuffer object's color buffer to internalTextureFormat.

Calls C++ function: void QOpenGLFramebufferObjectFormat::setInternalTextureFormat(unsigned int internalTextureFormat).

C++ documentation:

Sets the internal format of a framebuffer object’s texture or multisample framebuffer object’s color buffer to internalTextureFormat.

See also internalTextureFormat().

source

pub unsafe fn set_mipmap(&self, enabled: bool)

Enables mipmapping if enabled is true; otherwise disables it.

Calls C++ function: void QOpenGLFramebufferObjectFormat::setMipmap(bool enabled).

C++ documentation:

Enables mipmapping if enabled is true; otherwise disables it.

Mipmapping is disabled by default.

If mipmapping is enabled, additional memory will be allocated for the mipmap levels. The mipmap levels can be updated by binding the texture and calling glGenerateMipmap(). Mipmapping cannot be enabled for multisampled framebuffer objects.

See also mipmap() and QOpenGLFramebufferObject::texture().

source

pub unsafe fn set_samples(&self, samples: c_int)

Sets the number of samples per pixel for a multisample framebuffer object to samples. The default sample count of 0 represents a regular non-multisample framebuffer object.

Calls C++ function: void QOpenGLFramebufferObjectFormat::setSamples(int samples).

C++ documentation:

Sets the number of samples per pixel for a multisample framebuffer object to samples. The default sample count of 0 represents a regular non-multisample framebuffer object.

If the desired amount of samples per pixel is not supported by the hardware then the maximum number of samples per pixel will be used. Note that multisample framebuffer objects can not be bound as textures. Also, the GL_EXT_framebuffer_multisample extension is required to create a framebuffer with more than one sample per pixel.

See also samples().

source

pub unsafe fn set_texture_target(&self, target: c_uint)

Sets the texture target of the texture attached to a framebuffer object to target. Ignored for multisample framebuffer objects.

Calls C++ function: void QOpenGLFramebufferObjectFormat::setTextureTarget(unsigned int target).

C++ documentation:

Sets the texture target of the texture attached to a framebuffer object to target. Ignored for multisample framebuffer objects.

See also textureTarget() and samples().

source

pub unsafe fn texture_target(&self) -> c_uint

Returns the texture target of the texture attached to a framebuffer object. Ignored for multisample framebuffer objects. The default is GL_TEXTURE_2D.

Calls C++ function: unsigned int QOpenGLFramebufferObjectFormat::textureTarget() const.

C++ documentation:

Returns the texture target of the texture attached to a framebuffer object. Ignored for multisample framebuffer objects. The default is GL_TEXTURE_2D.

See also setTextureTarget() and samples().

Trait Implementations§

source§

impl CppDeletable for QOpenGLFramebufferObjectFormat

source§

unsafe fn delete(&self)

Destroys the QOpenGLFramebufferObjectFormat.

Calls C++ function: [destructor] void QOpenGLFramebufferObjectFormat::~QOpenGLFramebufferObjectFormat().

C++ documentation:

source§

impl PartialEq<Ref<QOpenGLFramebufferObjectFormat>> for QOpenGLFramebufferObjectFormat

source§

fn eq(&self, other: &Ref<QOpenGLFramebufferObjectFormat>) -> bool

Returns true if all the options of this framebuffer object format are the same as other; otherwise returns false.

Calls C++ function: bool QOpenGLFramebufferObjectFormat::operator==(const QOpenGLFramebufferObjectFormat& other) const.

C++ documentation:

Returns true if all the options of this framebuffer object format are the same as other; otherwise returns false.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.