From 1c3ae79ad36f77a044adb6264396e46575ee8757 Mon Sep 17 00:00:00 2001 From: Ben Fletcher Date: Tue, 25 Jan 2022 16:59:03 -0800 Subject: rhi: Add support for polygon fill mode Support for Polygon Mode (Triangle Fill Mode in Metal, Fill Mode in D3D) in the RHI graphics pipeline. Options are Fill and Line Status: OpenGL - ok Vulkan - ok Metal - ok D3D11 - ok OpenGL ES - does not support glPolygonMode. Change-Id: I20b7ef416624700c3dc8d1cbe6474f4ca3889db8 Reviewed-by: Laszlo Agocs --- src/gui/rhi/qrhi.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/gui/rhi/qrhi.cpp') diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp index f583160f3c..d5a9ef6515 100644 --- a/src/gui/rhi/qrhi.cpp +++ b/src/gui/rhi/qrhi.cpp @@ -4255,6 +4255,20 @@ QDebug operator<<(QDebug dbg, const QRhiShaderResourceBindings &srb) \value DecrementAndWrap */ +/*! + \enum QRhiGraphicsPipeline::PolygonMode + \brief Specifies the polygon rasterization mode + + Polygon Mode (Triangle Fill Mode in Metal, Fill Mode in D3D) specifies + the fill mode used when rasterizing polygons. Polygons may be drawn as + solids (Fill), or as a wire mesh (Line). + + \note OpenGL ES does not support Polygon Mode + + \value Fill The interior of the polygon is filled (default) + \value Line Boundary edges of the polygon are drawn as line segments. + */ + /*! \class QRhiGraphicsPipeline::TargetBlend \internal -- cgit v1.2.3