11/*
2- * Copyright 2019-2023 Diligent Graphics LLC
2+ * Copyright 2019-2025 Diligent Graphics LLC
33 * Copyright 2015-2019 Egor Yusov
44 *
55 * Licensed under the Apache License, Version 2.0 (the "License");
@@ -68,13 +68,16 @@ DILIGENT_TYPED_ENUM(INPUT_ELEMENT_FREQUENCY, Uint8)
6868// / Description of a single element of the input layout
6969struct LayoutElement
7070{
71- // / HLSL semantic. Default value ("ATTRIB") allows HLSL shaders to be converted
71+ // / HLSL semantic.
72+
73+ // / Default value (`"ATTRIB"`) allows HLSL shaders to be converted
7274 // / to GLSL and used in OpenGL backend as well as compiled to SPIRV and used
7375 // / in Vulkan backend.
7476 // / Any value other than default will only work in Direct3D11 and Direct3D12 backends.
7577 const Char* HLSLSemantic DEFAULT_INITIALIZER (" ATTRIB" );
7678
7779 // / Input index of the element that is specified in the vertex shader.
80+
7881 // / In Direct3D11 and Direct3D12 backends this is the semantic index.
7982 Uint32 InputIndex DEFAULT_INITIALIZER (0 );
8083
@@ -87,25 +90,31 @@ struct LayoutElement
8790 // / Type of the element components, see Diligent::VALUE_TYPE for details.
8891 VALUE_TYPE ValueType DEFAULT_INITIALIZER (VT_FLOAT32);
8992
93+ // / Indicates if the value should be normalized.
94+
9095 // / For signed and unsigned integer value types
91- // / (VT_INT8, VT_INT16, VT_INT32, VT_UINT8, VT_UINT16, VT_UINT32)
96+ // / (` VT_INT8`, ` VT_INT16`, ` VT_INT32`, ` VT_UINT8`, ` VT_UINT16`, ` VT_UINT32` )
9297 // / indicates if the value should be normalized to [-1,+1] or
93- // / [0, 1] range respectively. For floating point types
94- // / (VT_FLOAT16 and VT_FLOAT32), this member is ignored.
98+ // / [0, 1] range respectively.
99+ // /
100+ // / For floating point types (`VT_FLOAT16` and `VT_FLOAT32`), this member is ignored.
95101 Bool IsNormalized DEFAULT_INITIALIZER (True);
96102
97103 // / Relative offset, in bytes, to the element bits.
98- // / If this value is set to LAYOUT_ELEMENT_AUTO_OFFSET (default value), the offset will
104+
105+ // / If this value is set to `LAYOUT_ELEMENT_AUTO_OFFSET` (default value), the offset will
99106 // / be computed automatically by placing the element right after the previous one.
100107 Uint32 RelativeOffset DEFAULT_INITIALIZER (LAYOUT_ELEMENT_AUTO_OFFSET);
101108
102109 // / Stride, in bytes, between two elements, for this buffer slot.
103- // / If this value is set to LAYOUT_ELEMENT_AUTO_STRIDE, the stride will be
110+
111+ // / If this value is set to `LAYOUT_ELEMENT_AUTO_STRIDE`, the stride will be
104112 // / computed automatically assuming that all elements in the same buffer slot are
105113 // / packed one after another. If the buffer slot contains multiple layout elements,
106114 // / they all must specify the same stride or use LAYOUT_ELEMENT_AUTO_STRIDE value.
107115 Uint32 Stride DEFAULT_INITIALIZER (LAYOUT_ELEMENT_AUTO_STRIDE);
108116
117+ // / Frequency of the input data, see Diligent::INPUT_ELEMENT_FREQUENCY for details.
109118 INPUT_ELEMENT_FREQUENCY Frequency DEFAULT_INITIALIZER (INPUT_ELEMENT_FREQUENCY_PER_VERTEX);
110119
111120 // / The number of instances to draw using the same per-instance data before advancing
@@ -208,9 +217,10 @@ typedef struct LayoutElement LayoutElement;
208217// / This structure is used by IRenderDevice::CreateGraphicsPipelineState().
209218struct InputLayoutDesc
210219{
211- // / Array of layout elements
220+ // / Array of layout elements.
212221 const LayoutElement* LayoutElements DEFAULT_INITIALIZER (nullptr );
213- // / Number of layout elements
222+
223+ // / The number of layout elements in `LayoutElements` array.
214224 Uint32 NumElements DEFAULT_INITIALIZER (0 );
215225
216226#if DILIGENT_CPP_INTERFACE
0 commit comments