• Advertisement

# Question about DirectX11 and braynzarsoft tutorial 18 FPS Camera

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

Hi,

Am trying to render a simple plane that work like the ground.

And this is the tutorial am following. in this tutorial he is

//Plane Vertex Vertex(-1.0f, -1.0f, -1.0f, 100.0f, 100.0f, 0.0f, 1.0f, 0.0f), Vertex( 1.0f, -1.0f, -1.0f, 0.0f, 100.0f, 0.0f, 1.0f, 0.0f), Vertex( 1.0f, -1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f), Vertex(-1.0f, -1.0f, 1.0f, 100.0f, 0.0f, 0.0f, 1.0f, 0.0f),

 DWORD indices[] =
{
0, 1, 2,
0, 2, 3,
}; 

void UpdateScene(double time)

{

groundWorld = XMMatrixIdentity(); //Define cube1's world space matrix

Scale = XMMatrixScaling( 500.0f, 10.0f, 500.0f );

Translation = XMMatrixTranslation( 0.0f, 10.0f, 0.0f );

groundWorld = Scale * Translation;

}

XMMATRIX groundWorld;
XMMATRIX Translation;
XMMATRIX Scale ;

The problem with this plane, is that when I try to render it I see nothing.

The problem I could come up with was that the plane was facing down and not up.

So I tried to rotate the plane and I succeded to see it, but I was wondering why in hes example he got the plane facing upward but while mine is facing downward.

P.S

I also got direction light and on mine after I rotate the plane the light bounce as normal. but how come my plane start facing downward and not upward?

I posted what I think is the most essensial. but please do tell me if I miss something

http://www.braynzarsoft.net/index.php?p=D3D11FPC

#### Share this post

##### Share on other sites
Advertisement

You can make yours face upwards by simply reversing the rendering of the vertices, instead of:

//Plane Vertex Vertex(-1.0f, -1.0f, -1.0f, 100.0f, 100.0f, 0.0f, 1.0f, 0.0f), Vertex( 1.0f, -1.0f, -1.0f, 0.0f, 100.0f, 0.0f, 1.0f, 0.0f), Vertex( 1.0f, -1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f), Vertex(-1.0f, -1.0f, 1.0f, 100.0f, 0.0f, 0.0f, 1.0f, 0.0f),

do this:

//Plane Vertex Vertex(-1.0f, -1.0f, 1.0f, 100.0f, 0.0f, 0.0f, 1.0f, 0.0f), Vertex( 1.0f, -1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f), Vertex( 1.0f, -1.0f, -1.0f, 0.0f, 100.0f, 0.0f, 1.0f, 0.0f), Vertex(-1.0f, -1.0f, -1.0f, 100.0f, 100.0f, 0.0f, 1.0f, 0.0f),

#### Share this post

##### Share on other sites

Thanks,am closer to what I want now :3

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement
• ### Popular Tags

• Advertisement
• ### Popular Now

• 10
• 11
• 9
• 16
• 19
• Advertisement