示例#1
0
        private void ViewChanged(Camera camera, Matrix matView)
        {
            if (camera != ActiveCamera)
            {
                return;
            }

            mGlobalBufferStore.matView = matView;
            mGlobalChanged             = true;

            M2Manager.ViewChanged();

            UpdateCursorPosition(true);
        }
示例#2
0
        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();
        }
示例#3
0
        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();
        }