1
OpenTK 프로젝트에서 2D 오브젝트를 회전하려고합니다.OpenTK - 2D 오브젝트를 회전하는 방법
회전 된 개체 뒤의 개체가 회전하고 그 개체를 원하지 않습니다.
이미 하나의 개체를 회전 한 후에 회전을 다시 설정하려면 어떻게해야합니까?
protected override void OnRenderFrame(FrameEventArgs e)
{
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
GL.MatrixMode(MatrixMode.Projection);
GL.LoadIdentity();
GL.Ortho(0, game.Width, game.Height, 0, -1, 4);
GL.MatrixMode(MatrixMode.Modelview);
GL.LoadIdentity();
drawObject();
GL.Rotate(180, Vector3d.UnitZ);
drawObject(); // Object I want to rotate
GL.Rotate(-180, Vector3d.UnitZ);
drawObject(); // I don't want this object to be rotated, but it does. How do I fix this?
}
고마워요!
당신에게 정말 고마워요 시도 할 수 있습니다, 여기 resetted 있습니다! – user2536897