コード例 #1
0
        public override void InitOtherStuff()
        {
            OutputTexture = PrivateRendererContext.CreateTexture2D("Blur_Output_Texture_" + DateTime.Now.Ticks, PrivateRendererContext.ViewportSize.X,
                PrivateRendererContext.ViewportSize.Y, false, IntPtr.Zero, false, true);

            uShift = new FreezingArcher.Math.Vector2(1.0f / OutputTexture.Width, 1.0f / OutputTexture.Height);
        }
コード例 #2
0
        public override void InitOtherStuff()
        {
            OutputTexture = PrivateRendererContext.CreateTexture2D("DistanceFog_Output_Texture_" + DateTime.Now.Ticks, PrivateRendererContext.ViewportSize.X,
                PrivateRendererContext.ViewportSize.Y, false, IntPtr.Zero, false, true);

            uShift = Math.Color4.Black;
        }
コード例 #3
0
        public CompositorOutputSlot(string name, int number, Texture2D output, CompositorSlotType type)
        {
            Name = name;
            SlotNumber = number;
            SlotTexture = output;
            SlotType = type;

            if ((SlotType == CompositorSlotType.Texture || SlotType == CompositorSlotType.ValueTexture) && SlotTexture == null)
                Logger.Log.AddLogEntry(LogLevel.Error, "CompositorInputSlot: " + Name, FreezingArcher.Core.Status.BadArgument);

            IsConnected = false;
        }
コード例 #4
0
ファイル: Sprite.cs プロジェクト: AreonDev/NoWayOut
        public bool Init(Texture2D tex)
        {
            if (tex == null || !tex.Created)
                return false;

            Scaling = new Vector2(1.0f, 1.0f);
            AbsolutePosition = new Vector2(0.0f, 0.0f);
            RelativePosition = new Vector2(0.0f, 0.0f);
            Rotation = 0;
            RotationPoint = new Vector2(0.0f, 0.0f);

            MyTexture = tex;
            MyTexture.SetUseCount(MyTexture.InternalUseCount + 1);

            return true;
        }
コード例 #5
0
ファイル: EndScreen.cs プロジェクト: AreonDev/NoWayOut
        public EndScreen (Application application, RendererContext rc, IEnumerable<Tuple<string, GameStateTransition>> from = null)
        {
            Renderer = rc;

            Application = application;

            if (!Application.Game.AddGameState ("endscreen_state", FreezingArcher.Content.Environment.Default, from))
            {
                Logger.Log.AddLogEntry (LogLevel.Error, "EndScreen", "Could not add Endscreen-State!");
            }

            State = Application.Game.GetGameState ("endscreen_state");
            MessageProvider = State.MessageProxy;
            BackgroundTexture = null;
            ValidMessages = new int [] { (int) MessageId.GameEnded, (int) MessageId.GameEndedDied,
                (int) MessageId.WindowResize, (int) MessageId.UpdateLocale };
            MessageProvider += this;
        }
コード例 #6
0
 public override void InitOtherStuff ()
 {
     OutputTexture = PrivateRendererContext.CreateTexture2D("Warping_Output_Texture_" + DateTime.Now.Ticks,
         PrivateRendererContext.ViewportSize.X, PrivateRendererContext.ViewportSize.Y, false, IntPtr.Zero,
         false, true);
 }
コード例 #7
0
ファイル: FrameBuffer.cs プロジェクト: AreonDev/NoWayOut
        public void AddTexture(Texture2D tex, AttachmentUsage au)
        {
            if(!m_PrepareMode)
                GL.BindFramebuffer(FramebufferTarget.Framebuffer, ID);

            DeleteTexture(au, true);

            if((tex != null) && (tex.Created))
            {
                tex.SetUseCount(tex.InternalUseCount + 1);
                m_Textures.Add(new TextureAttachment(tex, au));

                GL.FramebufferTexture2D(FramebufferTarget.Framebuffer, (FramebufferAttachment)au, TextureTarget.Texture2D, tex.ID, 0);
            }

            if(!m_PrepareMode)
                GL.BindFramebuffer(FramebufferTarget.Framebuffer, 0);
        }
コード例 #8
0
ファイル: Sprite.cs プロジェクト: AreonDev/NoWayOut
 public void Destroy()
 {
     MyTexture.SetUseCount(MyTexture.InternalUseCount - 1);
     MyTexture = null;
 }
コード例 #9
0
ファイル: Sprite.cs プロジェクト: AreonDev/NoWayOut
 public Sprite()
 {
     MyTexture = null;
 }