Ejemplo n.º 1
0
        public GuiRenderStack(RenderContext Context, GraphicsDevice Device)
        {
            this.Device = Device;
            this.Context = Context;

            ImmediateMode = new ImmediateMode2D(Device);
            MatrixStack = new MatrixStack();
        }
Ejemplo n.º 2
0
        public RenderContext(Effect Effect, GraphicsDevice Device)
        {
            this.Effect = Effect;
            this.Device = Device;

            for (var i = 0; i < 8; ++i) SetLight(i, Vector3.Zero, 0.0f, Vector3.Zero);

            White = new Texture2D(Device, 1, 1, false, SurfaceFormat.Color);
            White.SetData(new Color[] { new Color(255, 255, 255, 255) });

            Black = new Texture2D(Device, 1, 1, false, SurfaceFormat.Color);
            Black.SetData(new Color[] { new Color(0, 0, 0, 255) });

            NeutralNormals = new Texture2D(Device, 1, 1, false, SurfaceFormat.Color);
            NeutralNormals.SetData(new Color[] { new Color(128, 128, 255, 255) });

            _immediateMode = new ImmediateMode2D(Device);
        }