package speiger.src.coreengine.platform.graphics.opengl.utils;

import speiger.src.coreengine.math.vector.ints.Vec4i;
import speiger.src.coreengine.platform.graphics.api.utils.ScissorsManager.IScissorsHandler;

public record GLScissorsHandler(GLStates states) implements IScissorsHandler {
	@Override
	public void enable() { states.scissors.enable(); }
	@Override
	public void disable() { states.scissors.disable(); }
	@Override
	public void apply(int x, int y, int width, int height) { states.scissors.set(Vec4i.of(x, y, x + width, y + height)); }
}