
using Godot;
using System.Collections.Generic;

namespace Rokojori
{  
  public class RG_ScreenNormalRoughnessTexture:RGGraphProcessor, RDGraphTextureSlotInput
  {
    RDTexture _texture;

    public RDTexture GetTexture()
    {
      return _texture;
    }

    public RGGraphProcessor GetProcessor()
    {
      return this;
    } 

    List<CompositorEffectGraphTextureSlot> _connectedSlots = new List<CompositorEffectGraphTextureSlot>();

    public void SetConnected( CompositorEffectGraphTextureSlot slot )
    {
      _connectedSlots.Add( slot );
    }
    
    public void SetDisconnected( CompositorEffectGraphTextureSlot slot )
    {
      _connectedSlots.Remove( slot );
    }

    public RG_ScreenNormalRoughnessTexture( RDGraph graph ):base( graph )
    {} 

    public override void Process()
    {
      _texture = graph.context.GetScreenNormalRoughnessTexture();
    }

    public void ConnectTo( CompositorEffectGraphTextureSlot slot )
    {
      slot.SetInput( this );
    }

    public void Disconnect( CompositorEffectGraphTextureSlot slot )
    {
      slot.RemoveInput( this );
    }
    
  }
}