<p>Line strips and triangle strips are drawing modes supported across 3D graphics APIs, such as OpenGL, Direct3D, and Vulkan. When using indices to control drawing, a more recent feature is "strip cutting", also called "primitive restart", whereby a special index value can be inserted to indicate that the current strip has finished, and any following indices are part of a new strip.</p>

<p>On OpenGL, you can enable strip cutting by calling <code>glEnable(GL_PRIMITIVE_RESTART)</code> and disable it by calling <code>glDisable(GL_PRIMITIVE_RESTART)</code>. In Vulkan, you control this feature by setting the <code>primitiveRestartEnable</code> boolean field of the <code>VkPipelineInputAssemblyStateCreateInfo</code> structure. In Direct3D 12 you can use the <code>IBStripCutValue</code> member of the <code>D3D12_GRAPHICS_PIPELINE_STATE_DESC</code> structure to enable or disable strip cutting. Under Direct3D 11, this feature is on by default.</p>

<p>My question is, under Direct3D 11, can you turn this feature off in any way? <a href="https://docs.microsoft.com/en-us/windows/desktop/direct3d11/d3d10-graphics-programming-guide-primitive-topologies#generating-multiple-strips" rel="nofollow noreferrer">The documentation</a> on this is very brief, and indicates no way to disable it. Is there some magic setting lurking in the API somewhere that I've missed?</p>

CC BY-SA 4.0
2018-11-09T01:23:25.357Z
Is there a reason why you would need to? D3D11 picks a specific index (0xFFFF or 0xFFFFFFFF) to be the restart index. So can you not just avoid using that index in your meshes? If you have a mesh with exactly 65536 indices, just use a 32-bit index.
Nicol Bolas
CC BY-SA 4.0
2018-11-09T04:43:40.697Z
@NicolBolas I'm writing an abstract rendering API which can use multiple graphics APIs in the back-end. Strip cut imposes requirements on the way the caller generates their data, and they need to be aware of it. I'd like this feature to be under the control of the caller, so they can provide their data, and say whether strip cut is used. If I can't turn this feature off in Direct3D 11, it creates an inconsistency. Since this feature didn't exist in Direct3D 10, and it can be turned off in Direct3D 12, it strikes me as odd that I can't seem to turn it off under Direct3D 11, hence the question.
Roger Sanders
CC BY-SA 4.0
2018-11-09T12:49:46.083Z
There will be very few instances where a mesh has exactly 65536 vertices. So it's not going to matter in practice.
ratchet freak
<directx11><line-drawing><direct3d><drawing>
Can you disable strip cutting (AKA primitive restart) on Direct3D 11?
Roger Sanders
# Can you disable strip cutting (AKA primitive restart) on Direct3D 11?

(Asked by: username_0 on 2018-11-08)

Line strips and triangle strips are drawing modes supported across 3D graphics APIs, such as OpenGL, Direct3D, and Vulkan. When using indices to control drawing, a more recent feature is "strip cutting", also called "primitive restart", whereby a special index value can be inserted to indicate that the current strip has finished, and any following indices are part of a new strip.

On OpenGL, you can enable strip cutting by calling `glEnable(GL_PRIMITIVE_RESTART)` and disable it by calling `glDisable(GL_PRIMITIVE_RESTART)`. In Vulkan, you control this feature by setting the `primitiveRestartEnable` boolean field of the `VkPipelineInputAssemblyStateCreateInfo` structure. In Direct3D 12 you can use the `IBStripCutValue` member of the `D3D12_GRAPHICS_PIPELINE_STATE_DESC` structure to enable or disable strip cutting. Under Direct3D 11, this feature is on by default.

My question is, under Direct3D 11, can you turn this feature off in any way? [The documentation](https://docs.microsoft.com/en-us/windows/desktop/direct3d11/d3d10-graphics-programming-guide-primitive-topologies#generating-multiple-strips) on this is very brief, and indicates no way to disable it. Is there some magic setting lurking in the API somewhere that I've missed?

**Tags:** directx11, line-drawing, direct3d, drawing

> **Comments:**
> **username_1**: Is there a reason why you would need to? D3D11 picks a specific index (0xFFFF or 0xFFFFFFFF) to be the restart index. So can you not just avoid using that index in your meshes? If you have a mesh with exactly 65536 indices, just use a 32-bit index.  
> **username_0**: @username_1 I'm writing an abstract rendering API which can use multiple graphics APIs in the back-end. Strip cut imposes requirements on the way the caller generates their data, and they need to be aware of it. I'd like this feature to be under the control of the caller, so they can provide their data, and say whether strip cut is used. If I can't turn this feature off in Direct3D 11, it creates an inconsistency. Since this feature didn't exist in Direct3D 10, and it can be turned off in Direct3D 12, it strikes me as odd that I can't seem to turn it off under Direct3D 11, hence the question.  
> **username_2**: There will be very few instances where a mesh has exactly 65536 vertices. So it's not going to matter in practice.  

---

## 0 answers

