[][src]Struct qt_gui::QOpenGLFramebufferObjectFormat

#[repr(C)]pub struct QOpenGLFramebufferObjectFormat { /* fields omitted */ }

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.

Methods

impl QOpenGLFramebufferObjectFormat[src]

pub unsafe fn attachment(&self) -> Attachment[src]

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().

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

Assigns other to this object.

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

C++ documentation:

Assigns other to this object.

pub unsafe fn internal_texture_format(&self) -> c_uint[src]

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().

pub unsafe fn mipmap(&self) -> bool[src]

Returns true if mipmapping is enabled.

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

C++ documentation:

Returns true if mipmapping is enabled.

See also setMipmap().

pub unsafe fn new() -> CppBox<QOpenGLFramebufferObjectFormat>[src]

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().

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

Constructs a copy of other.

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

C++ documentation:

Constructs a copy of other.

pub unsafe fn samples(&self) -> c_int[src]

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().

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

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().

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

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().

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

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().

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

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().

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

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().

pub unsafe fn texture_target(&self) -> c_uint[src]

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

impl CppDeletable for QOpenGLFramebufferObjectFormat[src]

unsafe fn delete(&self)[src]

Destroys the QOpenGLFramebufferObjectFormat.

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

C++ documentation:

impl PartialEq<Ref<QOpenGLFramebufferObjectFormat>> for QOpenGLFramebufferObjectFormat[src]

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

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.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.