Esempio n. 1
0
        private void UpdateRenderingPriority()
        {
            IRenderTarget renderTarget = base.RenderTarget;

            if ((renderTarget != null) && renderTarget.IsSupported(RenderTargetType.Hardware, null, null, null))
            {
                using (CastOrRefHolder <IDeviceContext> holder = renderTarget.TryCastOrCreateRef <IDeviceContext>())
                {
                    if (holder.HasRef)
                    {
                        using (CastOrRefHolder <IDevice1> holder2 = holder.ObjectRef.Device.TryCastOrCreateRef <IDevice1>())
                        {
                            if (holder2.HasRef)
                            {
                                RenderingPriority renderingPriority = holder2.ObjectRef.RenderingPriority;
                                RenderingPriority priority2         = RenderingPriorityManager.RenderingPriority;
                                if (renderingPriority != priority2)
                                {
                                    holder2.ObjectRef.RenderingPriority = priority2;
                                }
                            }
                        }
                    }
                }
            }
        }