Jump to content
  • Advertisement
Sign in to follow this  
JimmyFo

OpenGL Using matrices for rotation

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

Hi all - I have a question concerning using my own matrices for translating and rotating the camera without the help of the opengl functions like gluLookAt, gluPerspective, and MatrixMode etc. I am familiar with the theory and have that understood - what I don't get is what to put in my display and reshape functions: void display() { ... glBegin(etc) glEnd } void reshape(height width) { setIdentity() ... } How to I reference the arrays I want and make sure they get displayed? Thanks a lot -james

Share this post


Link to post
Share on other sites
Advertisement
if you have the matricies created then look into 'glLoadMatrixf' to load the matrix in (set the mode first, PROJECTION or MODELVIEW). If you want to take a look at the implementation of 'gluLookAt' (how to create them yourself from scratch) or something then download 'Mesa3D', glu is included in the source code.

Maybe you can be a bit more specific of what you want, a little confused

HTH

Share this post


Link to post
Share on other sites
Thanks for that, I did a brief perusal and I think it may work - what I was trying to do was basically make my own graphics pipeline instead of using opengls (i.e. the glulookat/perspective/rotate/translate etc) - I understand the matrix manipulations, I just am wondering about how to use code to take them and manipulate them ( the display).

Thanks :)

-james

Share this post


Link to post
Share on other sites
Quote:
Original post by JimmyFo
what I was trying to do was basically make my own graphics pipeline instead of using opengls


so basically you want to drop opengl and write a software rasterizer? because multiplying a few matrices is NOT the pipeline and i wouldnt know how you want to write your own pipeline without dropping hardware support.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
as i think he want to do rotation for his object or anything else using the matrix array [4][4] not using glRotatef
i hope it is right

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!