Exemplo n.º 1
0
 /// <summary>
 /// Called when local transformations are set, eg when Position, Rotation, Scale etc. is changed.
 /// We use this to set this node as "dirty", eg that we need to update local transformations.
 /// </summary>
 protected virtual void OnTransformationsSet()
 {
     if (UseExternalTransformations)
     {
         return;
     }
     _isDirty = true;
     NodesManager.AddNodeToUpdateQueue(this);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Called when local transformations are set, eg when Position, Rotation, Scale etc. is changed.
 /// We use this to set this node as "dirty", eg that we need to update local transformations.
 /// </summary>
 protected virtual void OnTransformationsSet()
 {
     if (UseExternalTransformations)
     {
         return;
     }
     Utils.CountAndAlert.Count(Utils.CountAndAlert.PredefAlertTypes.ValueChanged);
     NodesManager.AddNodeToUpdateQueue(this);
     _isDirty = true;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Finish a drawing frame and render everything in queues.
        /// </summary>
        public static void EndDrawFrame()
        {
            // draw rendering queues
            RenderingQueues.DrawQueues();

            // notify nodes manager that a frame ended
            NodesManager.EndFrame();

            // clear the last material applied
            Materials.MaterialAPI._lastMaterialApplied = null;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Start a drawing frame.
        /// </summary>
        public static void StartDrawFrame()
        {
            // update culling nodes camera frustum
            CullingNode.CurrentCameraFrustum = ActiveCamera != null ? ActiveCamera.ViewFrustum : null;

            // update materials view and projection matrix
            if (ActiveCamera != null)
            {
                Materials.MaterialAPI.SetViewProjection(ActiveCamera.View, ActiveCamera.Projection);
            }

            // notify nodes manager that a frame started
            NodesManager.StartFrame();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Finish a drawing frame and render everything in queues.
        /// </summary>
        public static void EndDrawFrame()
        {
            // draw rendering queues
            RenderingQueues.DrawQueues();

            // notify nodes manager that a frame ended
            NodesManager.EndFrame();

            // start frame for deferred lighting manager
            if (IsDeferredLightingEnabled)
            {
                _DeferredLighting.FrameEnd();
            }

            // clear the last material applied
            Materials.MaterialAPI._lastMaterialApplied = null;
        }