Simple renderer in .net with SharpGL (openGL)


Re: Simple renderer in .net with SharpGL (openGL)
#46
I did not realize it's the gluLookAt function. Anyway that's a modelview function, but the following perspective (gluPerspective i assume) will override it. This is because your preceding matrixmode indicated all matrix related functions must use the projection matrix.

The projection and viewmatrix must be set separately, and will always stay separate. In practice you initialize the projection matrix just once, and do all the per frame (camera control) stuff in the viewmatrix.

If you use the lookat function (after the matrixmode switch to modelview), you don't need to translate as the lookat function constructs the viewmatrix includiing lookat correction, hence the name.

I hope this is what you ment.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: Simple renderer in .net with SharpGL (openGL) - by Roland Melkert - 2013-12-06, 20:27

Forum Jump:


Users browsing this thread: 1 Guest(s)