Пример #1
0
        public GuiRenderStack(RenderContext Context, GraphicsDevice Device)
        {
            this.Device = Device;
            this.Context = Context;

            ImmediateMode = new ImmediateMode2D(Device);
            MatrixStack = new MatrixStack();
        }
Пример #2
0
        public ImmediateMode2d(GraphicsDevice device)
        {
            this.GraphicsDevice = device;
            //Effect = new AlphaTestEffect(device);
            Effect = new BasicEffect(device);
            Camera = new Cameras.OrthographicCamera(device.Viewport);
            MatrixStack = new MatrixStack();

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

            White = new Texture2D(device, 1, 1, false, SurfaceFormat.Color);
            White.SetData(new Color[] { new Color(255, 255, 255, 255) });
            //Effect.ReferenceAlpha = 32;
            Effect.TextureEnabled = true;
        }