Jump to content
  • Advertisement
Sign in to follow this  
Mr_Fox

One Index Buffer Multiple Line Strip

This topic is 821 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey Guys,

 

How do you guys cut linestip within one index buffer? MSDN says we could do that by adding -1 index to explicit cut line strip, but I have tried it, it doesn't work.

 

int16_t cubeLineStripIndices[CUBE_LINESTRIP_LENGTH] = {
        0, 1, 5, 4, 0, 2, 3, 7, 6, 2, 0xffff, 6, 4, 0xffff, 7, 5, 0xffff, 3, 1
    };
 

Any idea?

 

Thanks

Share this post


Link to post
Share on other sites
Advertisement
Try declaring your array as UINT for 16 bit index. Your 0xffff is correct.

Assume you are using direct x 11.

Int16_t is a typedef i believe and might be resolving back to int 32 bit. Just check

Share this post


Link to post
Share on other sites

Try declaring your array as UINT for 16 bit index. Your 0xffff is correct.

Assume you are using direct x 11.

Int16_t is a typedef i believe and might be resolving back to int 32 bit. Just check

Thanks ErnieDingo, but changing to UINT doesn't help, also BTW I am using DirectX 12.

Share this post


Link to post
Share on other sites

also BTW I am using DirectX 12.

In D3D11, primitive restart was permanently enabled, but in D3D12 it must be configured.
In your D3D12_GRAPHICS_PIPELINE_STATE_DESC struct, there is a IBStripCutValue member -- you need to set this to D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF.

Share this post


Link to post
Share on other sites

 

also BTW I am using DirectX 12.

In D3D11, primitive restart was permanently enabled, but in D3D12 it must be configured.
In your D3D12_GRAPHICS_PIPELINE_STATE_DESC struct, there is a IBStripCutValue member -- you need to set this to D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF.

 

Thanks Hodgman, you solved my problem~ I should really read those documentation carefully

:)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!