Exemplo n.º 1
0
        public override void Render(GraphicsDevice gd, CommandList cl, SceneContext sc, RenderPasses renderPass)
        {
            Debug.Assert(_imGuiRenderer != null);
            Debug.Assert(renderPass == RenderPasses.Overlay);

            _imGuiRenderer.Render(gd, cl);
        }
Exemplo n.º 2
0
 public override void CreateDeviceObjects(GraphicsDevice gd, CommandList cl, SceneContext sc)
 {
     if (_imGuiRenderer == null)
     {
         _imGuiRenderer = new ImGuiRenderer(gd, sc.MainSceneFramebuffer.OutputDescription, _width, _height, ColorSpaceHandling.Linear);
     }
     else
     {
         _imGuiRenderer.CreateDeviceResources(gd, sc.MainSceneFramebuffer.OutputDescription, ColorSpaceHandling.Linear);
     }
 }
Exemplo n.º 3
0
 public override void UpdatePerFrameResources(GraphicsDevice gd, CommandList cl, SceneContext sc)
 {
 }
Exemplo n.º 4
0
 public abstract void UpdatePerFrameResources(GraphicsDevice gd, CommandList cl, SceneContext sc);
Exemplo n.º 5
0
 public abstract void Render(GraphicsDevice gd, CommandList cl, SceneContext sc, RenderPasses renderPass);
Exemplo n.º 6
0
        public virtual void CreateGraphicsDeviceObjects(GraphicsDevice gd, CommandList cl, SceneContext sc)
        {
            ResourceFactory factory = gd.ResourceFactory;

            CameraInfoBuffer = factory.CreateBuffer(new BufferDescription((uint)Unsafe.SizeOf <CameraInfo>(), BufferUsage.UniformBuffer | BufferUsage.Dynamic));
            if (Camera != null)
            {
                UpdateCameraBuffers(cl);
            }

            TextureSamplerResourceLayout = factory.CreateResourceLayout(new ResourceLayoutDescription(
                                                                            new ResourceLayoutElementDescription("SourceTexture", ResourceKind.TextureReadOnly, ShaderStages.Fragment),
                                                                            new ResourceLayoutElementDescription("SourceSampler", ResourceKind.Sampler, ShaderStages.Fragment)));

            RecreateWindowSizedResources(gd, cl);
        }
 public abstract void CreateDeviceObjects(GraphicsDevice gd, CommandList cl, SceneContext sc);