summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-04-14 18:04:53 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-04-14 18:04:53 +0000
commita509e890a55eade6b10a36563f35219b61bf2707 (patch)
tree33da45d394e57b9afbeae90e78bcedbafdd320c3 /Graphics/GraphicsEngine
parentImplemented input vertex layout conversion in Vulkan (diff)
downloadDiligentCore-a509e890a55eade6b10a36563f35219b61bf2707.tar.gz
DiligentCore-a509e890a55eade6b10a36563f35219b61bf2707.zip
Moved primitive topology from draw attribs to pipeline state desc
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/interface/DeviceContext.h160
-rw-r--r--Graphics/GraphicsEngine/interface/GraphicsTypes.h156
-rw-r--r--Graphics/GraphicsEngine/interface/PipelineState.h29
3 files changed, 157 insertions, 188 deletions
diff --git a/Graphics/GraphicsEngine/interface/DeviceContext.h b/Graphics/GraphicsEngine/interface/DeviceContext.h
index d0656418..0e45b598 100644
--- a/Graphics/GraphicsEngine/interface/DeviceContext.h
+++ b/Graphics/GraphicsEngine/interface/DeviceContext.h
@@ -50,169 +50,11 @@ namespace Diligent
static constexpr INTERFACE_ID IID_DeviceContext =
{ 0xdc92711b, 0xa1be, 0x4319, { 0xb2, 0xbd, 0xc6, 0x62, 0xd1, 0xcc, 0x19, 0xe4 } };
-/// Input primitive topology.
-
-/// This enumeration is used by DrawAttribs structure to define input primitive topology.
-enum PRIMITIVE_TOPOLOGY : Int32
-{
- /// Undefined topology
- PRIMITIVE_TOPOLOGY_UNDEFINED = 0,
-
- /// Interpret the vertex data as a list of triangles.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST. OpenGL counterpart: GL_TRIANGLES.
- PRIMITIVE_TOPOLOGY_TRIANGLE_LIST,
-
- /// Interpret the vertex data as a triangle strip.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP. OpenGL counterpart: GL_TRIANGLE_STRIP.
- PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP,
-
- /// Interpret the vertex data as a list of points.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_POINTLIST. OpenGL counterpart: GL_POINTS.
- PRIMITIVE_TOPOLOGY_POINT_LIST,
-
- /// Interpret the vertex data as a list of lines.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_LINELIST. OpenGL counterpart: GL_LINES.
- PRIMITIVE_TOPOLOGY_LINE_LIST,
-
- /// Interpret the vertex data as a list of one control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of two control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of three control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of four control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of five control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of six control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of seven control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of eight control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of nine control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of ten control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 11 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 12 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 13 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 14 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 15 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 16 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 17 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 18 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 19 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 20 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 21 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 22 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 23 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 24 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 25 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 26 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 27 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 28 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 29 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 30 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 31 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST,
-
- /// Interpret the vertex data as a list of 32 control point patches.\n
- /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
- PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST,
-
- /// Helper value that stores the total number of topologies in the enumeration
- PRIMITIVE_TOPOLOGY_NUM_TOPOLOGIES
-};
-
/// Defines the draw command attributes
/// This structure is used by IRenderDevice::Draw()
struct DrawAttribs
{
- /// Input primitive topology, see Diligent::PRIMITIVE_TOPOLOGY.
- PRIMITIVE_TOPOLOGY Topology;
union
{
/// For a non-indexed draw call, number of vertices to draw
@@ -269,7 +111,6 @@ struct DrawAttribs
/// Default values:
/// Member | Default value
/// ------------------------|--------------
- /// Topology | PRIMITIVE_TOPOLOGY_UNDEFINED
/// NumVertices | 0
/// IndexType | VT_UNDEFINED
/// IsIndexed | False
@@ -281,7 +122,6 @@ struct DrawAttribs
/// FirstInstanceLocation | 0
/// pIndirectDrawAttribs | nullptr
DrawAttribs() :
- Topology(PRIMITIVE_TOPOLOGY_UNDEFINED),
NumVertices(0),
IndexType(VT_UNDEFINED),
IsIndexed(False),
diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
index 5e491482..fd60f6bc 100644
--- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h
+++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
@@ -897,6 +897,162 @@ namespace Diligent
MISC_TEXTURE_FLAG_GENERATE_MIPS = 0x01
};
+ /// Input primitive topology.
+
+ /// This enumeration is used by DrawAttribs structure to define input primitive topology.
+ enum PRIMITIVE_TOPOLOGY : Int8
+ {
+ /// Undefined topology
+ PRIMITIVE_TOPOLOGY_UNDEFINED = 0,
+
+ /// Interpret the vertex data as a list of triangles.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST. OpenGL counterpart: GL_TRIANGLES.
+ PRIMITIVE_TOPOLOGY_TRIANGLE_LIST,
+
+ /// Interpret the vertex data as a triangle strip.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP. OpenGL counterpart: GL_TRIANGLE_STRIP.
+ PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP,
+
+ /// Interpret the vertex data as a list of points.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_POINTLIST. OpenGL counterpart: GL_POINTS.
+ PRIMITIVE_TOPOLOGY_POINT_LIST,
+
+ /// Interpret the vertex data as a list of lines.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_LINELIST. OpenGL counterpart: GL_LINES.
+ PRIMITIVE_TOPOLOGY_LINE_LIST,
+
+ /// Interpret the vertex data as a list of one control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of two control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of three control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of four control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of five control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of six control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of seven control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of eight control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of nine control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of ten control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 11 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 12 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 13 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 14 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 15 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 16 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 17 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 18 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 19 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 20 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 21 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 22 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 23 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 24 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 25 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 26 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 27 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 28 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 29 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 30 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 31 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST,
+
+ /// Interpret the vertex data as a list of 32 control point patches.\n
+ /// D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST. OpenGL counterpart: GL_PATCHES.
+ PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST,
+
+ /// Helper value that stores the total number of topologies in the enumeration
+ PRIMITIVE_TOPOLOGY_NUM_TOPOLOGIES
+ };
+
/// Describes common device object attributes
struct DeviceObjectAttribs
{
diff --git a/Graphics/GraphicsEngine/interface/PipelineState.h b/Graphics/GraphicsEngine/interface/PipelineState.h
index f7fab697..34962f2e 100644
--- a/Graphics/GraphicsEngine/interface/PipelineState.h
+++ b/Graphics/GraphicsEngine/interface/PipelineState.h
@@ -37,33 +37,6 @@
namespace Diligent
{
-
-/// Primitive topology type
-
-/// [D3D12_PRIMITIVE_TOPOLOGY_TYPE]: https://msdn.microsoft.com/en-us/library/windows/desktop/dn770385(v=vs.85).aspx
-/// This enumeration describes primitive topology type. It generally mirrors [D3D12_PRIMITIVE_TOPOLOGY_TYPE] enumeration.
-/// The enumeration is used by GraphicsPipelineDesc to describe how the pipeline interprets
-/// geometry or hull shader input primitives
-enum PRIMITIVE_TOPOLOGY_TYPE : Int8
-{
- /// Topology is not defined
- PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED = 0,
-
- /// Interpret the input primitive as a point.
- PRIMITIVE_TOPOLOGY_TYPE_POINT,
-
- /// Interpret the input primitive as a line.
- PRIMITIVE_TOPOLOGY_TYPE_LINE,
-
- /// Interpret the input primitive as a triangle.
- PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE,
-
- /// Interpret the input primitive as a control point patch.
- PRIMITIVE_TOPOLOGY_TYPE_PATCH,
-
- /// Total number of topology types
- PRIMITIVE_TOPOLOGY_TYPE_NUM_TYPES
-};
/// Sample description
@@ -125,7 +98,7 @@ struct GraphicsPipelineDesc
//D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue;
/// Primitive topology type
- PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType = PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
+ PRIMITIVE_TOPOLOGY PrimitiveTopology = PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
/// Number of viewports used by this pipeline
Uint8 NumViewports = 1;