Using matrices for rotation

Started by
3 comments, last by GameDev.net 19 years, 6 months ago
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
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
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
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.
f@dzhttp://festini.device-zero.de
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

This topic is closed to new replies.

Advertisement