Jump to content
  • Advertisement
Sign in to follow this  
newtechnology

DX11 Terrain rendering problem

This topic is 1684 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'm reading Frank luna's DX11 book which requires D3D_FEATURE_LEVEL_11_0 support for terrain rendering (tessellation purpose) but my video card doesn't support it so I switched back to D3D_FEATURE_LEVEL_10_0. So I'm trying to port Frank Luna's DX10 book's example from DX10 interface to DX11 interface but I'm having some problem (The Application stops working), here is the source code.

https://www.mediafire.com/?v9alocfci1mcs31

Share this post


Link to post
Share on other sites
Advertisement

Application stops working doesn't help much. You should enable debugging in the D3D and check errors in the Visual Studio debug out and check return / error values from all direct3d calls. 

 

I could make a guess that you are having issues compiling shaders using tesselation since D3D10 doesn't support tesselation.

 

You'll need to find alternative way to create a terrain on D3D10 hardware or buy new display adaptor. There was a post with almost a same subject few days ago so look in to the forum and the answers to that message chain.

 

Cheers!

Share this post


Link to post
Share on other sites

This is my answer from the thread a couple days ago:

 

I ran into this exact problem when I was working through that book on one of my machines that had a crap video card.  I ended up implementing a CPU-based LOD system, by dividing the terrain mesh into patches and using a different set of vertex and index buffers for each LOD level.  Using the vertex shader to offset the patch vertices, you only need to keep one set of the LOD buffers around, so this isn't as hard on performance and memory as you might imagine...

 

My code is for C#/SlimDX, but it might give you some ideas.  I had lots of fun figuring out how to remove T-junctions between different LOD levels.

Share this post


Link to post
Share on other sites

Application stops working doesn't help much. You should enable debugging in the D3D and check errors in the Visual Studio debug out and check return / error values from all direct3d calls. 

 

I could make a guess that you are having issues compiling shaders using tesselation since D3D10 doesn't support tesselation.

 

You'll need to find alternative way to create a terrain on D3D10 hardware or buy new display adaptor. There was a post with almost a same subject few days ago so look in to the forum and the answers to that message chain.

 

Cheers!

If you look at source, I'm do checking errors and no, tessellation isn't the problem because I'm trying to port Frank Luna's DirectX 10 Example (which doesn't contain tessellation code.) of terrain rendering to DirectX 11 (just changing interface).

Share this post


Link to post
Share on other sites

Sorry for overlooking your original message. 

 

Anyway I stand by my original comment. "Application stops working" doesn't give any clue about the problem.

 

Also, linking a full source code of a program may not be helpful. Especially when the source code is packed. That'll reduce the amount of people interested investigating the problem. I, for one, won't bother downloading, opening a full project.

 

So, why not use the built-in debugger and step in your program and see where the program crashes. That's one of the basic tools you'll need to use / learn to use. 

 

When you find the part of the program which causes the problem, and you are unable to resolve the situation by yourself, you can post the problem causing lines of code here with the error code the Visual Studio gives. 

 

Cheers!

Share this post


Link to post
Share on other sites

I solved that problem but mine new problem is,

40T54Ql.png
I don't understand what's wrong (I would be glad if anyone would be able to explain me what is happening here.)

 

EDIT :

nmCjPwf.png
Finally, Solved that problem too. (it was problem with creating texture.)

Thank you everyone who helped me here, I appreciate it.

Edited by newtechnology

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!