QClearBuffers Class

class Qt3DRender ::QClearBuffers

Class to clear buffers. 更多...

头: #include <QClearBuffers>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
实例化: ClearBuffers
继承: Qt3DRender::QFrameGraphNode

公共类型

enum BufferType { None, ColorBuffer, DepthBuffer, StencilBuffer, DepthStencilBuffer, …, AllBuffers }
flags BufferTypeFlags

特性

公共函数

QClearBuffers (Qt3DCore::QNode * parent = nullptr)
Qt3DRender::QClearBuffers::BufferType buffers () const
QColor clearColor () const
float clearDepthValue () const
int clearStencilValue () const
Qt3DRender::QRenderTargetOutput * colorBuffer () const

公共槽

void setBuffers (Qt3DRender::QClearBuffers::BufferType buffers )
void setClearColor (const QColor & color )
void setClearDepthValue (float clearDepthValue )
void setClearStencilValue (int clearStencilValue )
void setColorBuffer (Qt3DRender::QRenderTargetOutput * buffer )

信号

void buffersChanged (Qt3DRender::QClearBuffers::BufferType buffers )
void clearColorChanged (const QColor & color )
void clearDepthValueChanged (float clearDepthValue )
void clearStencilValueChanged (int clearStencilValue )
void colorBufferChanged (Qt3DRender::QRenderTargetOutput * buffer )

详细描述

A Qt3DRender::QClearBuffers FrameGraph node enables clearing of the specific render target buffers with specific values.

成员类型文档编制

enum QClearBuffers:: BufferType
flags QClearBuffers:: BufferTypeFlags

此枚举类型描述要清零的缓冲类型。

常量 描述
Qt3DRender::QClearBuffers::None 0 No buffers will be cleared
Qt3DRender::QClearBuffers::ColorBuffer (1 << 0) Clear color buffers
Qt3DRender::QClearBuffers::DepthBuffer (1 << 1) Clear depth buffer
Qt3DRender::QClearBuffers::StencilBuffer (1 << 2) Clear stencil buffer
Qt3DRender::QClearBuffers::DepthStencilBuffer DepthBuffer | StencilBuffer Clear depth and stencil buffers
Qt3DRender::QClearBuffers::ColorDepthBuffer ColorBuffer | DepthBuffer Clear color and depth buffers
Qt3DRender::QClearBuffers::ColorDepthStencilBuffer ColorBuffer | DepthStencilBuffer Clear color, depth and stencil buffers
Qt3DRender::QClearBuffers::AllBuffers 0xFFFFFFFF Clear all buffers

The BufferTypeFlags type is a typedef for QFlags <BufferType>. It stores an OR combination of BufferType values.

特性文档编制

buffers : BufferType

Specifies the buffer type to be used.

访问函数:

Qt3DRender::QClearBuffers::BufferType buffers () const
void setBuffers (Qt3DRender::QClearBuffers::BufferType buffers )

通知程序信号:

void buffersChanged (Qt3DRender::QClearBuffers::BufferType buffers )

clearColor : QColor

Specifies the clear color to be used.

访问函数:

QColor clearColor () const
void setClearColor (const QColor & color )

通知程序信号:

void clearColorChanged (const QColor & color )

clearDepthValue : float

Specifies the clear depth value to be used.

访问函数:

float clearDepthValue () const
void setClearDepthValue (float clearDepthValue )

通知程序信号:

void clearDepthValueChanged (float clearDepthValue )

clearStencilValue : int

Specifies the stencil value to be used.

访问函数:

int clearStencilValue () const
void setClearStencilValue (int clearStencilValue )

通知程序信号:

void clearStencilValueChanged (int clearStencilValue )

colorBuffer : Qt3DRender::QRenderTargetOutput *

Specifies a specific color buffer to clear. If set to NULL (default), and ColorBuffer flag is set, all color buffers will be cleared.

访问函数:

Qt3DRender::QRenderTargetOutput * colorBuffer () const
void setColorBuffer (Qt3DRender::QRenderTargetOutput * buffer )

通知程序信号:

void colorBufferChanged (Qt3DRender::QRenderTargetOutput * buffer )

成员函数文档编制

[explicit] QClearBuffers:: QClearBuffers ( Qt3DCore::QNode * parent = nullptr)

The constructor creates an instance with the specified parent .