Archived

This topic is now archived and is closed to further replies.

MindWipe

Beginner problem (maybe?)

Recommended Posts

MindWipe    940
I'm a newby to 3d programming, thought I would do as most people and begin with creating a terrain engine. After many tries I get this: Can anyone explain what I've been doing wrong? Because it should look like a normal landscape (from green to black depending on height). And I know the heightmap is okey /MindWipe [EDIT] WTF did I upload it as a bmp? [/EDIT] [edited by - MindWipe on October 20, 2002 3:35:08 PM]

Share this post


Link to post
Share on other sites
Arion    133
Very nice Mr. MindWipe

I''m assuming that we are not seeing certain triangles that we should be seeing.

It does look like it might be a culling problem but hard to know at this point. If you reveresed the culling you shouldn''t be able to see any landscape if it is culling properly. You might try that as a test.


Guy, I regress: WW, TTC, THTV.

Share this post


Link to post
Share on other sites
MindWipe    940
Hmm...well, I think the problem has something to do with the Zbuffer.

lpD3DDevice->SetRenderState( D3DRS_ZENABLE, TRUE );

lpD3DDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE );

lpD3DDevice->SetRenderState( D3DRS_LIGHTING, FALSE );

I use that.. but then when I D3DCLEAR_ZBUFFER to the Clear, it doesn''t fill the bg with the color. So everything that has been drawn is left there!?

I''m a newby as I said

/MindWipe

Share this post


Link to post
Share on other sites
Arion    133

Not sure whats going on.

Try: D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER

That should clear the screen and the buffer.
If you are not trying that already.
Though by the artifacts I see, there is probably less than 50 % probability that would work.


Guy, I regress: WW, TTC, THTV.

Share this post


Link to post
Share on other sites