Jump to content
  • Advertisement
Sign in to follow this  
LeLorrain

New to 3D Game Engine Programming

This topic is 2688 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 just finished going through the code of Chapter 6 but there is an aspect that bugs me. I do not understand how the various methods in ZFXD3Dmisc.cpp are used... in particular, in InitStage, the 3D perspective and orthogonal matrices are computed, but there is no definition of the near and far planes that are used in the computation! Nowhere in the chapter are there any indications on when the View and Projection matrices are created; SetView3D just update existing matrices, SetClipping Planes too!

Should'nt the sequence of call be:

InitStage (Initialize the with default values)
SetMode (Setup the D3D viewport)

then a call to create the view and projection matrices followed by:

SetView3D (Modify the matrices)
SetClipping (Modify the matrices)

What am I missing? The rest of the chapter is about Shader and Vertex rendering.

Thanks,

LeLorrain

Share this post


Link to post
Share on other sites
Advertisement

I just finished going through the code of Chapter 6 but there is an aspect that bugs me. I do not understand how the various methods in ZFXD3Dmisc.cpp are used... in particular, in InitStage, the 3D perspective and orthogonal matrices are computed, but there is no definition of the near and far planes that are used in the computation! Nowhere in the chapter are there any indications on when the View and Projection matrices are created; SetView3D just update existing matrices, SetClipping Planes too!

Should'nt the sequence of call be:

InitStage (Initialize the with default values)
SetMode (Setup the D3D viewport)

then a call to create the view and projection matrices followed by:

SetView3D (Modify the matrices)
SetClipping (Modify the matrices)

What am I missing? The rest of the chapter is about Shader and Vertex rendering.

Thanks,

LeLorrain


Well You could always step through the code... I gave up on that book myself, only because I was working with a newer sdk, which meant half of the code was broken, and I wasn't adept enough to figure out why at that point in time. IMO his later book is much better, but that could just be because I understand so much more of what is going on than before.

Share this post


Link to post
Share on other sites
<br />you are missing mentioning the chapter 6 of what book you got stuck on <img src='http://public.gamedev.net/public/style_emoticons/default/wink.gif' class='bbc_emoticon' alt=';)' /><br /><br /><br />
<br /><br /><br />

Sorry, I thought that the heading of the message was enough... the book is "3D Game Engine Programming" by Stefan Zerbst & Oliver Düvel.

Share this post


Link to post
Share on other sites
<br />[quote name='LeLorrain' timestamp='1305224939' post='4809887']<br />I just finished going through the code of Chapter 6 but there is an aspect that bugs me. I do not understand how the various methods in ZFXD3Dmisc.cpp are used... in particular, in InitStage, the 3D perspective and orthogonal matrices are computed, but there is no definition of the near and far planes that are used in the computation! Nowhere in the chapter are there any indications on when the View and Projection matrices are created; SetView3D just update existing matrices, SetClipping Planes too!<br /><br />Should'nt the sequence of call be:<br /><br />      InitStage &nbsp;&nbsp;&nbsp; (Initialize the with default values)<br />      SetMode   &nbsp;&nbsp;&nbsp; (Setup the D3D viewport)<br /><br />then a call to create the view and projection matrices followed by:<br /><br />      SetView3D &nbsp;&nbsp;&nbsp; (Modify the matrices)<br />      SetClipping   (Modify the matrices)<br /><br />What am I missing? The rest of the chapter is about Shader and Vertex rendering.<br /><br />Thanks,<br /><br />LeLorrain<br />
<br /><br />Well You could always step through the code... I gave up on that book myself, only because I was working with a newer sdk, which meant half of the code was broken, and I wasn't adept enough to figure out why at that point in time. IMO his later book is much better, but that could just be because I understand so much more of what is going on than before.<br />[/quote]<br /><br /><br />

I have the 2004 edition which uses the SDK of D3D9c (Which is the SDK I have)

I do intend to continue looking at the code, it is just that I do not like to do something without understanding why I am doing it and to what purpose... and the way these methods are presented do not make sense to me. Also the demo sample given on the CD is not very enlightening for that matter.

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!