CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
GPUGraphicsPipeline.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "Common.hpp"
11#include "Forward.hpp"
12
13#include "GPUVertexFormat.hpp"
14
17
23
29
30#include <functional>
31#include <iosfwd>
32
33namespace CeresEngine {
42 Less,
45 Equal,
51 Greater,
60 };
61
82
127
131 Add,
133 Subtract,
137 Min,
139 Max,
140 };
141
145 Fill,
147 Wireframe,
149 Points,
150 };
151
155 Disabled,
157 Front,
159 Back,
160 };
161
168 Disabled,
170 Clear,
172 Set,
174 Copy,
178 NoOp,
180 Invert,
182 AND,
188 NAND,
190 OR,
192 ORReverse,
196 NOR,
198 XOR,
201 };
202
213
216 TOffset2<float> origin;
217
221 TExtent2<float> extent;
222
228 float minDepth = 0.0;
229
235 float maxDepth = 1.0;
236
238 Viewport() noexcept = default;
239
241 Viewport(const Viewport&) noexcept = default;
242 Viewport& operator=(const Viewport&) noexcept = default;
243
246 CE_EXPLICIT(false) inline Viewport(const float x, const float y, const float width, const float height) noexcept : origin{x, y}, extent{width, height} {}
247
250 CE_EXPLICIT(false) inline Viewport(const float x, const float y, const float width, const float height, const float minDepth, const float maxDepth) noexcept
251 : origin{x, y}, extent{width, height}, minDepth{minDepth}, maxDepth{maxDepth} {}
252
255 CE_EXPLICIT(false) inline Viewport(const TOffset2<float>& offset, const TExtent2<float>& extent) noexcept : origin{offset}, extent{extent} {}
256
259 CE_EXPLICIT(false) inline Viewport(const TExtent2<float>& extent) noexcept // NOLINT
260 : origin(0.0, 0.0), extent{extent} {}
261
264 CE_EXPLICIT(false) inline Viewport(const TExtent2<UInt32>& extent) noexcept // NOLINT
265 : Viewport(TExtent2<float>(extent)) {}
266
268 CE_EXPLICIT(false) inline Viewport(const TOffset2<float>& offset, const TExtent2<float>& extent, const float minDepth, const float maxDepth) noexcept
269 : origin{offset}, extent{extent}, minDepth{minDepth}, maxDepth{maxDepth} {}
270
273 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
274 CE_REFL_DATA(origin);
275 CE_REFL_DATA(extent);
276 CE_REFL_DATA(minDepth);
277 CE_REFL_DATA(maxDepth);
278 }
279 };
280
284 Int32 x = 0;
285
288 Int32 y = 0;
289
292 Int32 width = 0;
293
296 Int32 height = 0;
297
299 Scissor() noexcept = default;
300
302 Scissor(const Scissor&) noexcept = default;
303 Scissor& operator=(const Scissor&) noexcept = default;
304
307 inline Scissor(const Int32 x, const Int32 y, const Int32 width, const Int32 height) noexcept : x{x}, y{y}, width{width}, height{height} {}
308
310 inline Scissor(const TOffset2<Int32>& offset, const TExtent2<Int32>& extent) noexcept
311 : x{offset.x}, y{offset.y}, width{extent.width}, height{extent.height} {}
312
315 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
316 CE_REFL_DATA(x);
317 CE_REFL_DATA(y);
318 CE_REFL_DATA(width);
319 CE_REFL_DATA(height);
320 }
321 };
322
327
328 public: // Reflection
331 template<typename Processor> static constexpr void reflect(Processor&& RTTI) { CE_REFL_DATA(formats); }
332 };
333
339 bool enabled = false;
340
345 UInt32 samples = 1;
346
349 UInt32 sampleMask = ~0u;
350
354 [[nodiscard]] CE_SCRIPT_EXPORT()
355 inline UInt32 getSampleCount() const noexcept { return (enabled && samples > 1 ? samples : 1); }
356
359 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
360 CE_REFL_DATA(enabled);
361 CE_REFL_DATA(samples);
362 CE_REFL_DATA(sampleMask);
363 }
364 };
365
373 bool testEnabled = false;
374
378 bool writeEnabled = false;
379
383 GPUCompareOp compareOp = GPUCompareOp::Less;
384
387 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
388 CE_REFL_DATA(testEnabled);
389 CE_REFL_DATA(writeEnabled);
390 CE_REFL_DATA(compareOp);
391 }
392 };
393
398 GPUStencilOp stencilFailOp = GPUStencilOp::Keep;
399
403 GPUStencilOp depthFailOp = GPUStencilOp::Keep;
404
408 GPUStencilOp depthPassOp = GPUStencilOp::Keep;
409
412 GPUCompareOp compareOp = GPUCompareOp::Less;
413
417 UInt32 readMask = ~0u;
418
422 UInt32 writeMask = ~0u;
423
428 UInt32 reference = 0;
429
432 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
433 CE_REFL_DATA(stencilFailOp);
434 CE_REFL_DATA(depthFailOp);
435 CE_REFL_DATA(depthPassOp);
436 CE_REFL_DATA(compareOp);
437 CE_REFL_DATA(readMask);
438 CE_REFL_DATA(writeMask);
439 CE_REFL_DATA(reference);
440 }
441 };
442
449 bool testEnabled = false;
450
454
458
461 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
462 CE_REFL_DATA(testEnabled);
463 CE_REFL_DATA(front);
464 CE_REFL_DATA(back);
465 }
466 };
467
475 float constantFactor = 0.0f;
476
480 float slopeFactor = 0.0f;
481
485 float clamp = 0.0f;
486
489 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
490 CE_REFL_DATA(constantFactor);
491 CE_REFL_DATA(slopeFactor);
492 CE_REFL_DATA(clamp);
493 }
494 };
495
501 bool enabled = false;
502
505
509 float extraPrimitiveOverestimationSize = 0.0f;
510
513 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
514 CE_REFL_DATA(enabled);
515 CE_REFL_DATA(mode);
516 CE_REFL_DATA(extraPrimitiveOverestimationSize);
517 }
518 };
519
524 GPUPolygonMode polygonMode = GPUPolygonMode::Fill;
525
528 GPUCullMode cullMode = GPUCullMode::Disabled;
529
533
537
540 GPUConservativeRasterizationDescriptor conservativeRasterization;
541
545 bool frontCCW = false;
546
550 bool depthClampEnabled = false;
551
555 bool scissorTestEnabled = false;
556
560 bool antiAliasedLineEnabled = false;
561
567 float lineWidth = 1.0f;
568
571 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
572 CE_REFL_DATA(polygonMode);
573 CE_REFL_DATA(cullMode);
574 CE_REFL_DATA(depthBias);
575 CE_REFL_DATA(multiSampling);
576 CE_REFL_DATA(conservativeRasterization);
577 CE_REFL_DATA(frontCCW);
578 CE_REFL_DATA(depthClampEnabled);
579 CE_REFL_DATA(scissorTestEnabled);
580 CE_REFL_DATA(antiAliasedLineEnabled);
581 CE_REFL_DATA(lineWidth);
582 }
583 };
584
590 bool blendEnabled = false;
591
594 GPUBlendOp srcColor = GPUBlendOp::SourceAlpha;
595
599 GPUBlendOp dstColor = GPUBlendOp::InverseSourceAlpha;
600
604
607 GPUBlendOp srcAlpha = GPUBlendOp::SourceAlpha;
608
612 GPUBlendOp dstAlpha = GPUBlendOp::InverseSourceAlpha;
613
617
621 Vector4b colorMask = {true, true, true, true};
622
625 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
626 CE_REFL_DATA(blendEnabled);
627 CE_REFL_DATA(srcColor);
628 CE_REFL_DATA(dstColor);
629 CE_REFL_DATA(colorArithmetic);
630 CE_REFL_DATA(srcAlpha);
631 CE_REFL_DATA(dstAlpha);
632 CE_REFL_DATA(alphaArithmetic);
633 CE_REFL_DATA(colorMask);
634 }
635 };
636
645 bool alphaToCoverageEnabled = false;
646
655 bool independentBlendEnabled = false;
656
666 GPULogicOp logicOp = GPULogicOp::Disabled;
667
673 Vector4f blendFactor = {0.0f, 0.0f, 0.0f, 0.0f};
674
681
684 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
685 CE_REFL_DATA(alphaToCoverageEnabled);
686 CE_REFL_DATA(independentBlendEnabled);
687 CE_REFL_DATA(logicOp);
688 CE_REFL_DATA(blendFactor);
689 CE_REFL_DATA(targets);
690 }
691 };
692
720
725 GPUShaderProgramPtr shaderProgram = nullptr;
726
729 GPURenderPassPtr renderPass = nullptr;
730
735 GPUPipelineLayoutPtr pipelineLayout = nullptr;
736
740 PrimitiveTopology primitiveTopology = PrimitiveTopology::Triangles;
741
745 UInt32 patchControlPoints = 0;
746
749 Vector<Viewport> viewports;
750
755 Vector<Scissor> scissors;
756
760
764
768 String name;
769
772 template<typename Processor> static constexpr void reflect(Processor&& RTTI) {
773 CE_REFL_DATA(shaderProgram);
774 CE_REFL_DATA(renderPass);
775 CE_REFL_DATA(pipelineLayout);
776 CE_REFL_DATA(primitiveTopology);
777 CE_REFL_DATA(patchControlPoints);
778 CE_REFL_DATA(viewports);
779 CE_REFL_DATA(scissors);
780 CE_REFL_DATA(vertexInput);
782 CE_REFL_DATA(name);
783 }
784 };
785
788 using GPURenderingBlock = std::function<void()>;
789
790 class CE_SCRIPT_EXPORT() GPUGraphicsPipeline : public TDeviceObject<GPUGraphicsPipelineDescriptor> {
791 public:
793 using TDeviceObject::TDeviceObject;
794
798
802
803 public:
808 [[nodiscard]] CE_SCRIPT_EXPORT()
809 virtual GPUResourceSetPtr createResourceSet(const GPUResourceSetDescriptor& descriptor, UInt32 setIndex = 0) = 0;
810
812 virtual void begin(GPUCommandBuffer& commandBuffer) = 0;
813
815 virtual void end(GPUCommandBuffer& commandBuffer) = 0;
816
818 class Scope {
819 private:
821 GPUCommandBuffer* mCommandBuffer = nullptr;
822
824 GPUGraphicsPipeline* mGraphicsPipeline = nullptr;
825
826 public:
830 explicit Scope(GPUCommandBuffer& commandBuffer, GPUGraphicsPipeline& graphicsPipeline)
831 : mCommandBuffer(&commandBuffer), mGraphicsPipeline(&graphicsPipeline) {
832 mGraphicsPipeline->begin(*mCommandBuffer);
833 }
834
836 explicit Scope(const GPUCommandBufferPtr& commandBuffer, GPUGraphicsPipeline& graphicsPipeline) : Scope(*commandBuffer, graphicsPipeline) {}
837
839 explicit Scope(GPUCommandBuffer& commandBuffer, const GPUGraphicsPipelinePtr& graphicsPipeline) : Scope(commandBuffer, *graphicsPipeline) {}
840
842 explicit Scope(const GPUCommandBufferPtr& commandBuffer, const GPUGraphicsPipelinePtr& graphicsPipeline)
843 : Scope(*commandBuffer, *graphicsPipeline) {}
844
846 ~Scope() noexcept { reset(); }
847
848 public:
850 void reset() {
851 if(mGraphicsPipeline != nullptr) {
852 mGraphicsPipeline->end(*mCommandBuffer);
853 mGraphicsPipeline = nullptr;
854 mCommandBuffer = nullptr;
855 }
856 }
857 };
858
865 template<typename Func, typename... Args> decltype(auto) with(GPUCommandBuffer& commandBuffer, Func&& func) {
866 const Scope scope(commandBuffer, *this);
867 return func();
868 }
869 };
870
875 std::ostream& operator<<(std::ostream& os, const GPUCompareOp& value);
876
881 std::ostream& operator<<(std::ostream& os, const GPUStencilOp& value);
882
887 std::ostream& operator<<(std::ostream& os, const GPUBlendOp& value);
888
893 std::ostream& operator<<(std::ostream& os, const GPUBlendArithmetic& value);
894
899 std::ostream& operator<<(std::ostream& os, const GPUPolygonMode& value);
900
905 std::ostream& operator<<(std::ostream& os, const GPUCullMode& value);
906
911 std::ostream& operator<<(std::ostream& os, const GPULogicOp& value);
912
913} // namespace CeresEngine
914
917
920
923
926
929
932
935
938
941
944
947
950
953
#define CE_REFLECT_HASH(T)
Definition Hash.hpp:89
#define CE_REFL_DATA(N)
Definition Macros.hpp:541
#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
#define CE_EXPLICIT(EXPR)
Definition Macros.hpp:413
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition GPUCommandBuffer.hpp:77
A helper class that begins a scoped graphics pipeline recording.
Definition GPUGraphicsPipeline.hpp:818
Scope(GPUCommandBuffer &commandBuffer, GPUGraphicsPipeline &graphicsPipeline)
Creates a new scope and calls begin() on the pipeline.
Definition GPUGraphicsPipeline.hpp:830
Scope(const GPUCommandBufferPtr &commandBuffer, const GPUGraphicsPipelinePtr &graphicsPipeline)
Creates a new scope and calls begin() on the pipeline.
Definition GPUGraphicsPipeline.hpp:842
~Scope() noexcept
Unbound the pipeline from the command buffer.
Definition GPUGraphicsPipeline.hpp:846
Scope(const GPUCommandBufferPtr &commandBuffer, GPUGraphicsPipeline &graphicsPipeline)
Creates a new scope and calls begin() on the pipeline.
Definition GPUGraphicsPipeline.hpp:836
Scope(GPUCommandBuffer &commandBuffer, const GPUGraphicsPipelinePtr &graphicsPipeline)
Creates a new scope and calls begin() on the pipeline.
Definition GPUGraphicsPipeline.hpp:839
void reset()
Unbound the pipeline from the command buffer.
Definition GPUGraphicsPipeline.hpp:850
Definition GPUGraphicsPipeline.hpp:790
decltype(auto) with(GPUCommandBuffer &commandBuffer, Func &&func)
Prepares the pipeline for execution.
Definition GPUGraphicsPipeline.hpp:865
GPUGraphicsPipeline(GPUGraphicsPipeline &&)=delete
Deleted move constructor.
GPUGraphicsPipeline(const GPUGraphicsPipeline &)=delete
Deleted copy constructor.
virtual void end(GPUCommandBuffer &commandBuffer)=0
Finishes the pipeline execution.
GPUGraphicsPipeline & operator=(const GPUGraphicsPipeline &)=delete
GPUGraphicsPipeline & operator=(GPUGraphicsPipeline &&)=delete
virtual void begin(GPUCommandBuffer &commandBuffer)=0
Prepares the pipeline for execution.
Definition Common.hpp:62
Definition Application.hpp:19
GPUPolygonMode
Polygon filling modes enumeration.
Definition GPUGraphicsPipeline.hpp:143
@ Wireframe
Draw triangle edges only.
@ Points
Draw vertex points only.
@ Fill
Draw filled polygon.
GPUCullMode
Polygon culling modes enumeration.
Definition GPUGraphicsPipeline.hpp:153
@ Back
Back face culling.
@ Front
Front face culling.
GPUConservativeRasterizationMode
Specify the conservative rasterization mode.
Definition GPUGraphicsPipeline.hpp:204
@ Underestimate
Specifies that conservative rasterization is enabled in underestimation mode.
@ Overestimate
Specifies that conservative rasterization is enabled in overestimation mode.
constexpr Byte operator<<(const Byte arg, const _IntType shift) noexcept
Definition DataTypes.hpp:44
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
GPUCompareOp
Compare operations enumeration.
Definition GPUGraphicsPipeline.hpp:37
@ NotEqual
Comparison passes if the source data is not equal to the right-hand-side.
@ Less
Comparison passes if the source data is less than the destination data.
@ AlwaysPass
Comparison always passes.
@ GreaterEqual
Comparison passes if the source data is greater than or equal to the right-hand-side.
@ Greater
Comparison passes if the source data is greater than the right-hand-side.
@ NeverPass
Comparison never passes.
@ LessEqual
Comparison passes if the source data is less than or equal to the right-hand-side.
GPUBlendOp
Blending operations enumeration.
Definition GPUGraphicsPipeline.hpp:84
@ DestinationAlpha
Data source is alpha data (A) from a framebuffer.
@ One
Data source is the color white (1, 1, 1, 1).
@ InverseDestinationColor
Data source is inverted color data (1 - RGB) from a framebuffer.
@ InverseDestinationAlpha
Data source is inverted alpha data (1 - A) from a framebuffer.
@ SourceColor
Data source is color data (RGB) from a fragment shader.
@ InverseSourceAlpha
Data source is inverted alpha data (1 - A) from a fragment shader.
@ Source1Color
Data sources are both color data (RGB) from a fragment shader with dual-source color blending.
@ BlendFactor
Data source is the blend factor (RGBA) from the blend state.
@ SourceAlpha
Data source is alpha data (A) from a fragment shader.
@ InverseSource1Color
Data sources are both inverted color data (1 - RGB) from a fragment shader with dual-source color ble...
@ Source1Alpha
Data sources are both alpha data (A) from a fragment shader with dual-source color blending.
@ SourceAlphaSaturate
Data source is alpha data (A) from a fragment shader which is clamped to 1 or less.
@ InverseSourceColor
Data source is inverted color data (1 - RGB) from a fragment shader.
@ DestinationColor
Data source is color data (RGB) from a framebuffer.
@ InverseBlendFactor
Data source is the inverted blend factor (1 - RGBA) from the blend state.
@ InverseSource1Alpha
Data sources are both inverted alpha data (1 - A) from a fragment shader with dual-source color blend...
std::int32_t Int32
Definition DataTypes.hpp:21
struct CeresEngine::GLState state
GPUBlendArithmetic
Blending arithmetic operations enumeration.
Definition GPUGraphicsPipeline.hpp:129
@ ReverseSubtract
Subtract source 2 from source 1.
GPUStencilOp
Stencil operations enumeration.
Definition GPUGraphicsPipeline.hpp:63
@ Keep
Keep the existing stencil data.
@ Replace
Set the stencil data to the reference value.
@ IncrementAndClamp
Increment the stencil value by 1, and clamp the result.
@ IncrementAndWrap
Increment the stencil value by 1, and wrap the result if necessary.
@ DecrementAndWrap
Decrement the stencil value by 1, and wrap the result if necessary.
@ Invert
Invert the stencil data.
@ DecrementAndClamp
Decrement the stencil value by 1, and clamp the result.
@ Zero
Set stencil data to 0.
sfl::small_vector< T, N, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > SmallVector
SmallVector is a sequence container similar to Vector.
Definition SmallVector.hpp:31
std::array< T, N > Array
Array is a container that encapsulates fixed size arrays.
Definition Array.hpp:17
std::uint32_t UInt32
Definition DataTypes.hpp:23
std::function< void()> GPURenderingBlock
A block executed by the render pass implementation when the renderer is ready to receive draw command...
Definition GPUComputePipeline.hpp:60
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
std::set< Key, Compare, ScopedAllocatorAdaptor< StdAllocator< Key, RawAllocator > > > Set
Set is an associative container that contains a sorted set of unique objects of type Key.
Definition Set.hpp:21
GPULogicOp
Logical pixel operation enumeration.
Definition GPUGraphicsPipeline.hpp:166
@ NOR
Resulting operation: ~(src | dst).
@ OR
Resulting operation: src | dst.
@ ANDReverse
Resulting operation: src & ~dst.
@ NAND
Resulting operation: ~(src & dst).
@ AND
Resulting operation: src & dst.
@ Copy
Resulting operation: src.
@ NoOp
Resulting operation: dst.
@ ORInverted
Resulting operation: ~src | dst.
@ XOR
Resulting operation: src ^ dst.
@ ANDInverted
Resulting operation: ~src & dst.
@ Equivalent
Resulting operation: ~(src ^ dst).
@ ORReverse
Resulting operation: src | ~dst.
@ Clear
Resulting operation: 0.
@ CopyInverted
Resulting operation: ~src.
Blending state descriptor structure.
Definition GPUGraphicsPipeline.hpp:638
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition GPUGraphicsPipeline.hpp:684
Array< GPUBlendTargetDescriptor, 8 > targets
Render-target blend states for the respective color attachments.
Definition GPUGraphicsPipeline.hpp:680
Blend target state descriptor structure.
Definition GPUGraphicsPipeline.hpp:586
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition GPUGraphicsPipeline.hpp:625
Conservative rasterization descriptor structure to control how the GPU should perform conservative ra...
Definition GPUGraphicsPipeline.hpp:498
Depth bias descriptor structure to control fragment depth values.
Definition GPUGraphicsPipeline.hpp:469
Depth state descriptor structure.
Definition GPUGraphicsPipeline.hpp:367
Definition GPUGraphicsPipeline.hpp:721
Graphics pipeline state descriptor structure.
Definition GPUGraphicsPipeline.hpp:694
GPUBlendDescriptor blend
Specifies the blending state descriptor.
Definition GPUGraphicsPipeline.hpp:709
GPURasterizerDescriptor rasterizer
Definition GPUGraphicsPipeline.hpp:705
GPUStencilDescriptor stencil
Specifies the stencil state descriptor.
Definition GPUGraphicsPipeline.hpp:701
GPUDepthDescriptor depth
Specifies the depth state descriptor.
Definition GPUGraphicsPipeline.hpp:697
Multi-sampling descriptor structure.
Definition GPUGraphicsPipeline.hpp:335
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition GPUGraphicsPipeline.hpp:359
Rasterizer state descriptor structure.
Definition GPUGraphicsPipeline.hpp:521
Definition GPUResourceSet.hpp:716
Stencil state descriptor structure.
Definition GPUGraphicsPipeline.hpp:444
Stencil face descriptor structure.
Definition GPUGraphicsPipeline.hpp:395
Determines how vertices should be handled as input on vertex shaders.
Definition GPUGraphicsPipeline.hpp:324
SmallVector< GPUVertexFormat, 1 > formats
A structure that declares every element in vertex buffers.
Definition GPUGraphicsPipeline.hpp:326
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition GPUGraphicsPipeline.hpp:331
Primitive topology enumeration.
Definition PrimitiveTopology.hpp:21
Definition GPUGraphicsPipeline.hpp:281
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition GPUGraphicsPipeline.hpp:315
Scissor(const TOffset2< Int32 > &offset, const TExtent2< Int32 > &extent) noexcept
Scissor constructor with offset and extent parameters.
Definition GPUGraphicsPipeline.hpp:310
Definition GPUGraphicsPipeline.hpp:214
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition GPUGraphicsPipeline.hpp:273
TExtent2< float > extent
The viewport size.
Definition GPUGraphicsPipeline.hpp:221
TOffset2< float > origin
The viewport origin. By default (0.0, 0.0).
Definition GPUGraphicsPipeline.hpp:216