package PBuffer;

sub new($$) {
	my ($class) = @_;

	my $self = {};

	$self->{"programs"} = [];

	bless $self;

	return $self;
}

sub SetParams($$) {
	my ($self,$params) = @_;
	
	if(defined($params->{"programs"})) {
		foreach $program (@{$params->{"programs"}}) {
			$program = new Program();
			$program->SetParams("program" => $program);
			
			push @{$self->{"programs"}), $program;
		}
	}
}

sub Render($$) {
	my ($self, $msec) = @_;
	
	foreach $program (@{$self->{"programs"}}) {
		$program->Render($msec);
	}
}

1;
