1

Today I debugged my code and saw that my worldviewproj was huge (sorry it it's not readable):

enter image description here

{ 4.91479736e+010, -6.29708390e+010, -863636224, 432034112 }

That's the first line, and I'm trying to debug my code because my application doesn't display anything. My world matrix is the identity matrix and my view matrix is also huge.

So my question, what's the range of a worldviewproj matrix? Or is it normal that it is that big and it's something else?

EDIT: Figured out I was wrongly setting the fovY of the projection matrix :) But,... as I said the view matrix is now the problem :( The View Matrix has in every entry -431602080

EDIT 2: I can facepalm myself!! I forgot to store the computed matrix in the view variable in my camera class :|

Rakete1111
  • 47,013
  • 16
  • 123
  • 162
  • Those values doesn't seem to make sense. Either your memmory is corrupted or you create this matrix in a wrong way somehow. Take a look here, what the separate fields of the matrix are responsible for http://www.codinglabs.net/article_world_view_projection_matrix.aspx Your matrix is definetely NOT normal ;) – Elvithari Sep 08 '14 at 06:39
  • If you can't see anything obvious, make sure you're not running foul of some 16-byte alignment issues with the XMMATRIX structures. – Roger Rowland Sep 08 '14 at 08:40
  • @Elvithari I know, it's weird :) I will look at the article you posted. Thanks! Roger I will check that – Rakete1111 Sep 08 '14 at 15:04
  • Thanks to everyone that helped me!! @Elvithari I just remembered, you helped me last time :D – Rakete1111 Sep 08 '14 at 18:14
  • Yeah, I did. Jumping into graphics programming is a real fun but can quite challenging at the beginning. So I'm happy to help anyone who's starting ;) – Elvithari Sep 08 '14 at 18:35
  • You might want to take a look at [SimpleMath](http://blogs.msdn.com/b/shawnhar/archive/2013/01/08/simplemath-a-simplified-wrapper-for-directxmath.aspx) in the [DirectX Tool Kit](http://go.microsoft.com/fwlink/?LinkId=248929) as a slightly more gentle introduction to [DirectXMath](http://blogs.msdn.com/b/chuckw/archive/2012/03/27/introducing-directxmath.aspx). – Chuck Walbourn Sep 12 '14 at 00:27
  • No, that's ok, just got confused :D – Rakete1111 Sep 12 '14 at 19:15

1 Answers1

0

My Worldviewproj was so big, because

1) I set wrong arguments to the projection matrix, and

2) the view matrix was filled with random data because I failed to initialize it!

Rakete1111
  • 47,013
  • 16
  • 123
  • 162