Terrain rendering problem

Started by
7 comments, last by 215648 10 years, 3 months ago

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

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!

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.

Eric Richards

SlimDX tutorials - http://www.richardssoftware.net/

Twitter - @EricRichards22

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).

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!

q1uy9Hh.png

2UIybzX.png

Also, before that line there's a "Access violation reading location 0xFEEEFEEE", which would mean that something is referencing memory that has already been freed.

http://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_debug_values

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.

This topic is closed to new replies.

Advertisement