ok I am having an issue where I have a plane which I am spinning in 3d space, and it is getting cut off then the edge is to far away, or past the near.
so I figured I would set the near and far to really high numbers to see if that would fix it, but it doesn't seem to matter, does ortho not cover this?
I assumed that the -10000 would be more than enough for the near, but the corners at certain angles is cut off (looks flat) and I am just curious as to why, the video is not wider than 800 and it is at 0, so the max it could be is -800 right? maybe a bit further, but shouldn't come near -10,000, but no matter what value I use, it doesn't seem to make a difference.
also if I scale it to .5, .5, .5 it isn't clipped at all, so I am not sure how to fix it.
GL.MatrixMode(MatrixMode.Projection);
GL.LoadIdentity();[/quote]This is replacing your ortho projection matrix with an 'identity' projection matrix.
You should probably be activating the Projection matrix-mode before setting your ortho matrix, and then setting the ModelView matrix-mode before setting identity + rotating.
ok this is weird, if the matrix is "replaced" then why does commenting out ortho have a different result?
I set the ortho, for the width and height, then I set the Matrix mode, if that is truly replacing the matrix then there shouldn't be any difference between
but there is most definitely a difference, BUT I think I just figured out what may be wrong (as I was typing)
I think matrix mode generates the projection Identity matrix using the current matrix, BUT it will remove the z index stuff because a projection matrix has a 0 for the z index. screen_height 0 0
0 screen_width 0
0 0 0
MatrixMode selects which built-in matrix will be modified by the following matrix commands. Before you call Identity+Ortho, you should select the Projection matrix -- this matrix is used to transform camera-space positions to the screen.
Before you call Identity+Rotate, you should select the ModelView matrix -- this matrix is used to position the object (model) and camera (view).
In your original, you're not selecting a mode before calling Ortho, so maybe it's defaulting to the ModelView matrix. This means that you'd have them backwards: your ortho-projection in the ModelView, and your camera/object rotation in the Projection. This might have strange results, as the operations will be done in the wrong order.
N.B. LoadIdentity "clears" the currently selected matrix; you should use it before setting up any matrix from scratch.