Jump to content
• Advertisement

# Question about DirectX11 and braynzarsoft tutorial 18 FPS Camera

This topic is 2124 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 Contributors

1. 1
Rutin
27
2. 2
3. 3
4. 4
5. 5
• Advertisement

• 11
• 11
• 10
• 13
• 20
• ### Forum Statistics

• Total Topics
632948
• Total Posts
3009399
• ### Who's Online (See full list)

There are no registered users currently online

×

## 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!