private void ViewChanged(Camera camera, Matrix matView) { if (camera != ActiveCamera) { return; } mGlobalBufferStore.matView = matView; mGlobalChanged = true; M2Manager.ViewChanged(); UpdateCursorPosition(true); }
private void ProjectionChanged(Camera camera, Matrix matProj) { if (camera != ActiveCamera) { return; } mGlobalBufferStore.matProj = matProj; mGlobalChanged = true; var perspectiveCamera = camera as PerspectiveCamera; if (perspectiveCamera == null) { return; } mGlobalParamsBufferStore.fogParams.Z = perspectiveCamera.FarClip; mGlobalParamsChanged = true; M2Manager.ViewChanged(); }
private void ProjectionChanged(Camera camera, Matrix matProj) { if (camera != ActiveCamera) { return; } var vp = GraphicsContext.Viewport; mGlobalBufferStore.matProj = matProj; mGlobalBufferStore.viewport = new Vector4(vp.Width, vp.Height, vp.MinDepth, vp.MaxDepth); var perspectiveCamera = camera as PerspectiveCamera; if (perspectiveCamera != null) { mGlobalBufferStore.fogParams.Z = perspectiveCamera.FarClip; } mGlobalBufferChanged = true; M2Manager.ViewChanged(); }