Jump to content
  • Advertisement
Sign in to follow this  
marius1930

D3D Drawing / Strange result

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

http://home.no.net/gmg/result.jpg Is there anything in the drawing commands that could cause such a result, anything besides an error in the vertex/index buffer? Basicly have two projects (sample+own), both have identical vertex and index buffers, one works, the other doesnt. (everything is connected to the start, and it stops rendering the 'terrain' all of the sudden, supposedly 64x64) -- Also what is the recommended/absolute maximum vertices in a vertex buffer? Note: also posted in beginners, but figure it may be easier to get a reply here.

Share this post


Link to post
Share on other sites
Advertisement
Are you using 32bit indexbuffers? Then you should check whether your video-hardware supports them... i had weird problems with that too.
Infact, it's good practice to check for all capabilities used in your code, @ initialization.

Do you have installed the DX Debug runtimes? They might give you some info about things that go wrong.

good luck.. hope you can kill the bug ;)

Share this post


Link to post
Share on other sites
Debug info was actually turned off by a mistake, on now but no errors are detected.

The index buffers are 16 bits


Thing is in the sample code(from a book), it displays fine.
I've dumped the index and vertex buffers from both my code and the sample code, the data is identical.

Share this post


Link to post
Share on other sites
Sob... i change to 32bit index buffers and it works just fine..
(sample code is still running fine at 16bit)

What could cause this?
With two equal index buffers even..

Share this post


Link to post
Share on other sites
Supposed to be a 64 x 64 grid, instead it stops halfway and links everything to the beginning.

It does however work fine under 32 bit, just gave up on googling the differences between a 16 and 32 bit index buffer, too many random results.

Looking into it at some later date, sample code still runs fine on 16bit :/

Share this post


Link to post
Share on other sites
You're writing an array of 32-bit integers as a 16-bit index buffer. Use 16-bit integers when setting up your index buffer.

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!