package speiger.src.coreengine.rendering.input.window;

import org.lwjgl.glfw.GLFWVidMode;

public class VideoMode
{
	final Monitor monitor;
	final int width;
	final int height;
	final int redBits;
	final int greenBits;
	final int blueBits;
	final int refreshrate;
	
	public VideoMode(Monitor monitor, GLFWVidMode buffer)
	{
		this.monitor = monitor;
		width = buffer.width();
		height = buffer.height();
		redBits = buffer.redBits();
		greenBits = buffer.greenBits();
		blueBits = buffer.blueBits();
		refreshrate = buffer.refreshRate();
	}
	
	public VideoMode(Monitor monitor, GLFWVidMode.Buffer buffer)
	{
		this.monitor = monitor;
		width = buffer.width();
		height = buffer.height();
		redBits = buffer.redBits();
		greenBits = buffer.greenBits();
		blueBits = buffer.blueBits();
		refreshrate = buffer.refreshRate();
	}
	
	public VideoMode(Monitor monitor, int width, int height, int redBits, int greenBits, int blueBits, int refreshrate)
	{
		this.monitor = monitor;
		this.width = width;
		this.height = height;
		this.redBits = redBits;
		this.greenBits = greenBits;
		this.blueBits = blueBits;
		this.refreshrate = refreshrate;
	}
	
	public Monitor getMonitor()
	{
		return monitor;
	}
	
	public int getWidth()
	{
		return width;
	}
	
	public int getHeight()
	{
		return height;
	}
	
	public int getRedBits()
	{
		return redBits;
	}
	
	public int getGreenBits()
	{
		return greenBits;
	}
	
	public int getBlueBits()
	{
		return blueBits;
	}
	
	public int getRefreshRate()
	{
		return refreshrate;
	}
	
	@Override
	public String toString()
	{
		return "Video Mode[Width="+width+", Height="+height+", Rate="+refreshrate+", Monitor="+monitor+"]";
	}
}