package speiger.src.coreengine.ui.gui.utils;

import speiger.src.coreengine.assets.api.ID;
import speiger.src.coreengine.platform.graphics.api.shader.ShaderPipeline;
import speiger.src.coreengine.platform.graphics.api.shader.states.GraphicsDataType;
import speiger.src.coreengine.platform.graphics.api.shader.states.ShaderType;
import speiger.src.coreengine.platform.graphics.api.texture.states.TextureType;
import speiger.src.coreengine.platform.graphics.api.vertex.VertexLayout;
import speiger.src.coreengine.platform.graphics.api.vertex.VertexLayout.Usage;

public class UIConstants {
	public static final VertexLayout GUI_LAYOUT = VertexLayout.builder()
			.element("pos", 0, 3, Usage.POS)
			.element("color", 1, 4, Usage.COLOR, GraphicsDataType.BYTE)
			.build();
	public static final VertexLayout GUI_TEXTURED_LAYOUT = VertexLayout.builder()
			.element("pos", 0, 3, Usage.POS)
			.element("tex", 1, 2, Usage.UV)
			.element("color", 2, 4, Usage.COLOR, GraphicsDataType.BYTE)
			.build();
	
	public static final ShaderPipeline GUI = ShaderPipeline.builder(ID.of("gui"))
			.withStage(ShaderType.VERTEX, ID.of("shader/gui/guiVertex.txt"))
			.withStage(ShaderType.FRAGMENT, ID.of("shader/gui/guiFragment.txt"))
			.withFormat(GUI_LAYOUT)
			.build();
	public static final ShaderPipeline GUI_TEXTURED = ShaderPipeline.builder(ID.of("gui"))
			.withStage(ShaderType.VERTEX, ID.of("shader/gui/guiVertex.txt"))
			.withStage(ShaderType.FRAGMENT, ID.of("shader/gui/guiFragment.txt"))
			.withTexture("texture", 0, 0, TextureType.TEXTURE_2D)
			.withFormat(GUI_TEXTURED_LAYOUT)
			.build();
}
