DrawIndexedPrimitives Problem

Hi..

I try to use vertexbuffer und indexbuffer to create a terrain. I use just the same Code in this link (please look at the bottom of the page):

http://www.riemers.net/Tutorials/DirectX/Csharp/tut7.php

Then I try to change the width and the height of the terrain (instead 4x3 I make for example 40x30).

When I start my application, then my computer freeze. Can you please check the code and samy me what do I make false

Thanks..



Answer this question

DrawIndexedPrimitives Problem

  • Tekdino

    That’s exactly what I have done but my card is somewhat newer than yours.

    Have you try the reference device If it work this way it seams to be a driver problem. Maybe you should update to a newer if it is possible.



  • Clayton DuVall

    I am just modified this example the same way and it works for me.

    You should enable the debug runtime and unmanaged debugging to look for an error or warning during you step through your code. Additional you should try the Reference device. It works for me too but maybe you have done something that I am not.

    Maybe the problem is the driver or the hardware. What graphics card do you use



  • Mazzica

    Hi Ralf. Yes I changed the highdata. I made all 0;
  • bonskijr

    Hi Ralf..

    Does it work when you change the WIDTH and HEIGHT variables I can  create maximun a  4*4 terrain.

    I have a Radeon 7000 AGP 32MB grafic card.


  • jhidey

    Have you changed the LoadHighData method too It need to create and initializes an array of the same size as your terrain.



  • DrawIndexedPrimitives Problem