Jump to content
  • Advertisement
Sign in to follow this  
godsenddeath

questions about the MODELVIEW matrix in openGL

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

ok i'm used to DirectX, where world and view transforms are completely sepereate, but from what I understand, in opengl there's done together? how would I transform the camera on its own? thanks

Share this post


Link to post
Share on other sites
Advertisement
DirectX has:
- World
- View
- Projection

OpenGL has:
- Model-view = DX:World*View
- Projection

Essentially all Direct3D is doing is doing the Model and view multiplication itself. So you need to transform your model's then multiply the resulting matrix by the camera matrix which is then multiplied by the projection matrix when rendering to create the final vector screen position.

Share this post


Link to post
Share on other sites
oh ok, but the matrices are multiplied implicitly right? when you write something like :

glTranslatef(0,0,5.0f);
glRotatef(90,0,1.0f,0);

this is equivilent to

D3DXMatrixTranslation(&Trans,0,0,5.0f);
D3DXMatrixRotationY(&Rot,D3DXToRadian(90));

device->SetTransformation(D3DTS_WORLD,&(Trans * Rot));


am I right? or am I looking at it the wrong way?


and if i'm right, then i'd just do all my camera transforms first, and then the following transforms would be automaticlly multiplied against the camera?

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!