如何设置openTK,以便在以下位置获得正投影:
我目前有这个:
_projectionMatrix = Matrix4.CreateOrthographicOffCenter(
ClientRectangle.X, ClientRectangle.Width,
ClientRectangle.Y, ClientRectangle.Height, -1.0f, 1.0f);
我不能完全理解正在发生的事情,但是原点现在在左下角,而且我也不知道坐标是否与屏幕上的像素匹配。
Matrix4.CreateOrthographicOffCenter
的参数是长方体视图体积的Matrix4.CreateOrthographicOffCenter
,left
,right
,bottom
,top
和near
。
如果视图(far
)的原点必须在顶部,则必须交换ClientRectangle.Y
和top
参数:
bottom