Struct qt_gui::QOpenGLFramebufferObjectFormat
source · #[repr(C)]pub struct QOpenGLFramebufferObjectFormat { /* private fields */ }
Expand description
The QOpenGLFramebufferObjectFormat class specifies the format of an OpenGL framebuffer object.
C++ class: QOpenGLFramebufferObjectFormat
.
The QOpenGLFramebufferObjectFormat class specifies the format of an OpenGL framebuffer object.
A framebuffer object has several characteristics:
- Number of samples per pixels.
- Depth and/or stencil attachments.
- Texture target.
- Internal texture format.
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
impl QOpenGLFramebufferObjectFormat
sourcepub unsafe fn attachment(&self) -> Attachment
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
.
Returns the configuration of the depth and stencil buffers attached to a framebuffer object. The default is QOpenGLFramebufferObject::NoAttachment.
See also setAttachment().
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QOpenGLFramebufferObjectFormat>>
) -> Ref<QOpenGLFramebufferObjectFormat>
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)
.
Assigns other to this object.
sourcepub unsafe fn internal_texture_format(&self) -> c_uint
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
.
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().
sourcepub unsafe fn mipmap(&self) -> bool
pub unsafe fn mipmap(&self) -> bool
Returns true
if mipmapping is enabled.
Calls C++ function: bool QOpenGLFramebufferObjectFormat::mipmap() const
.
Returns true
if mipmapping is enabled.
See also setMipmap().
sourcepub unsafe fn new() -> CppBox<QOpenGLFramebufferObjectFormat>
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()
.
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().
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QOpenGLFramebufferObjectFormat>>
) -> CppBox<QOpenGLFramebufferObjectFormat>
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)
.
Constructs a copy of other.
sourcepub unsafe fn samples(&self) -> c_int
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
.
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().
sourcepub unsafe fn set_attachment(&self, attachment: Attachment)
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)
.
Sets the attachment configuration of a framebuffer object to attachment.
See also attachment().
sourcepub unsafe fn set_internal_texture_format(
&self,
internal_texture_format: c_uint
)
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)
.
Sets the internal format of a framebuffer object’s texture or multisample framebuffer object’s color buffer to internalTextureFormat.
See also internalTextureFormat().
sourcepub unsafe fn set_mipmap(&self, enabled: bool)
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)
.
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().
sourcepub unsafe fn set_samples(&self, samples: c_int)
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)
.
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().
sourcepub unsafe fn set_texture_target(&self, target: c_uint)
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)
.
Sets the texture target of the texture attached to a framebuffer object to target. Ignored for multisample framebuffer objects.
See also textureTarget() and samples().
sourcepub unsafe fn texture_target(&self) -> c_uint
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
.
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
impl CppDeletable for QOpenGLFramebufferObjectFormat
source§unsafe fn delete(&self)
unsafe fn delete(&self)
Destroys the QOpenGLFramebufferObjectFormat.
Calls C++ function: [destructor] void QOpenGLFramebufferObjectFormat::~QOpenGLFramebufferObjectFormat()
.
Destroys the QOpenGLFramebufferObjectFormat.
source§impl PartialEq<Ref<QOpenGLFramebufferObjectFormat>> for QOpenGLFramebufferObjectFormat
impl PartialEq<Ref<QOpenGLFramebufferObjectFormat>> for QOpenGLFramebufferObjectFormat
source§fn eq(&self, other: &Ref<QOpenGLFramebufferObjectFormat>) -> bool
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
.
Returns true
if all the options of this framebuffer object format are the same as other; otherwise returns false
.