Example #1
0
 public void PreDraw(GraphicsDevice device, RenderContext context)
 {
     var worldTransform = _spacial.Transform;
     rootNode.UpdateWorldTransform(worldTransform);
     rootNode.PreDraw(device, context);
 }
Example #2
0
 public override void DrawEx(RenderContext context)
 {
     if (renderTarget != null)
     {
         context.Texture = renderTarget;
         context.World = localTransformation;
         context.DrawTexturedFullbright(quadModel);
     }
 }
Example #3
0
 public void DrawEx(RenderContext context)
 {
     rootNode.DrawEx(context);
 }
Example #4
0
        public override void PreDraw(GraphicsDevice device, RenderContext context)
        {
            if (renderTarget == null)
            {
                renderTarget = new RenderTarget2D(device, uiCamera.Viewport.Width, uiCamera.Viewport.Height);
                var rawGuiQuad = Gen.CreateTexturedQuad();
                Gen.Colorize(rawGuiQuad, Vector4.One);
                rawGuiQuad = Gen.FacetCopy(rawGuiQuad);
                quadModel = CompiledModel.CompileModel(new RawModel(rawGuiQuad), device);
            }

            module.DrawRoot(uiRoot, uiCamera, renderTarget);
        }