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);
        }
        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;
        }
        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;
        }
Beispiel #4
0
        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;
        }
Beispiel #5
0
        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;
        }
 public override void InitOtherStuff ()
 {
     OutputTexture = PrivateRendererContext.CreateTexture2D("Warping_Output_Texture_" + DateTime.Now.Ticks,
         PrivateRendererContext.ViewportSize.X, PrivateRendererContext.ViewportSize.Y, false, IntPtr.Zero,
         false, true);
 }
Beispiel #7
0
        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);
        }
Beispiel #8
0
 public void Destroy()
 {
     MyTexture.SetUseCount(MyTexture.InternalUseCount - 1);
     MyTexture = null;
 }
Beispiel #9
0
 public Sprite()
 {
     MyTexture = null;
 }