Jump to content
  • Advertisement
Sign in to follow this  
giugio

OpenGL matrix

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

hy. I'm still studing the directx , but i'm not understand the use of matrix for the transform. In particular the view matrix the world matrix and the projection matrix. With the settransform i multiply the matrix for another matrix or i simply "set" the special(view , world or projection)matrix? And : After a transformation i must reset the world matrix(in opengl glidentity())? How?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by giugio
hy.
I'm still studing the directx , but i'm not understand the use of matrix for the transform.
In particular the view matrix the world matrix and the projection matrix.
With the settransform i multiply the matrix for another matrix or i simply "set" the special(view , world or projection)matrix?

And :
After a transformation i must reset the world matrix(in opengl glidentity())?
How?
SetTransform() just sets the transform, it doesn't multiply it by the current matrix. If you want that, look into ID3DXMatrixStack.

And you only need to set an identity matrix if you want the next thing to draw with an identity matrix. If the next thing is going to call SetTransform() anyway, then there's no need to set an identity matrix.

Share this post


Link to post
Share on other sites
Hi giugio.

Explaining the intricacies of matrices will take some time I'm afraid and will be quite difficult to do concisely in one post, given that I'm not sure what level of Maths you're comfortable with.

However, I've suggested a good book out there that will probably explain this subject matter to you a lot more clearly. Matrices, matrix transformations and their use within DirectX can be quite involved and I doubt anyone here will be able to run you through all the technicalities in a way that you'll understand.

On the subject of matrix mathematics, there are literally thousands upon thousands of books out there. Any maths book that includes matrices will do and many of them have exercises so that you can practise the maths on your own.

However, if that's not the problem and you really just want to see how matrices fit within the framework of DirectX in particular, then one book that I've found VERY useful is:

Introduction to 3D Game Programming with DirectX 9.0 - By Frank D Luna

There's a new edition out that also explains advanced topics, like shaders, so once you've grasped the basics this book should still prove useful.

Sorry if this isn't much help, but sometimes the best way to learn is to research it yourself first, then ask specific questions on specific points if more clarity is needed.

And remember, books are just one way to learn. The Internet has lots of good material, as does GameDev. I'm sure someone may link you a good GameDev link shortly. I don't know that many myself 'cos I'm a bit of an old fashioned book worm ^^

Share this post


Link to post
Share on other sites
Usually it's better to start with DirectX only after some months dedicated only to mathematics.
Anyway, you can find a very good documentation about matrices in the DirectX SDK documentation for C++.

Oppure chiedi a me su msn.

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!