🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

glMatrixMode(GL_MODELVIEW);

Started by
1 comment, last by chris82 24 years ago
what the hell this function do? because if i put this function on my program the object disappear P.S i don''t reset it with glLoadIdentity.
Advertisement
glMatrixMode() switches the matrixmode to GL_MODELVIEW or GL_PROJECTION. When the matrixmode is GL_PROJECTION, you can edit the projection matrix; when it''s GL_MODELVIEW you can edit the modelview matrix.

Changes to your objects positions should done in the modelview matrix, as should your camera movement. The perspective matrix is usually only used for changing the camera lens setup, so after you''ve set up your display, you should keep the matrixmode set to GL_MODELVIEW.

If that doesn''t explain it enough, read a book on the subject or go find a tutorial. The subject is also pretty well described in the VC++ online manual.

http://www.geocities.com/ben32768

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

Hi Chris82,

I dunno if you have something basis of Matrices Mathematic ...

But they are oven use in computer programming, because they dont store the Answer of Something, but the Equation or Inequation of something... So for Rotation, Scaling, Translation, Perspective, ... You can do all of those transformations by only Multiplicating the Result of those matrices of your Object !!!

Check on msdn.microsoft.com/directx
go in : Direct3d / Immediate Mode
and search in this directories for basis of matrices... and can find some tuts on matrices here too.

For your question, i cannot answer it, after you had read this post, you known probably Why ?!...

They are from mathematic... so your problem it''s almost the misuse of matrices.. But use them they speed Up your 3d engine...

LowRad

This topic is closed to new replies.

Advertisement