Jump to content
  • Advertisement
Sign in to follow this  
Zmax

IndexBuffers

This topic is 4814 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

I loaded a big heightmap in a vertex buffer and i wanted to create the indexBuffer for each vertex...if i use "short" type of indexBuffer it works well but i need something bigger,..much bigger,..long for example.If i replace short with logn in the indexBuffer declaration i get an error in the render sub when trying the set : device.indices=indexBuffer I tryed another declaration type for the indexBuffer withe sixteenBitIndices paramters set to false,true...anything ..doesn;t work.Can you pls tell me what should i do to use long,int,int32,...indexBuffers?Thnanx!

Share this post


Link to post
Share on other sites
Advertisement
You need to use the D3DFMT_INDEX32 format for your index buffer. I'm no expert on the matter, but I believe it is less supported. I'm not sure you're programming in the same language I am, so just ignore me if the D3DFMT_INDEX32 format makes no sense.

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603
In managed code, the format is called Index32. Note that not all devices support this index buffer format.


And those that support Index32 don't necessarily support 232 indexes.

Share this post


Link to post
Share on other sites
Yeah, thanx i'm working vb.net but i know c# too.Can anybody show me an index buffer declaration of this type?This is how it looks in vb.net of short type:

indexBuffer = New IndexBuffer(GetType(Short), HeightMapCls.BmpWidth * 6 * HeightMapCls.BmpHeight + 1, device, 0, Pool.Default)
i tryed this one too but doesn't work: indexBuffer = New IndexBuffer(device, HeightMapCls.BmpWidth * 6 * HeightMapCls.BmpHeight + 1, 0, Pool.Default, true)

true is for the sixteenindex buffer,..i tryed false too :)) but no positive result.hmmm

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!