package speiger.src.coreengine.platform.graphics.api.core;

import java.util.List;

import speiger.src.coreengine.platform.graphics.api.buffer.VertexBuffer;
import speiger.src.coreengine.platform.graphics.api.buffer.states.BufferState;
import speiger.src.coreengine.platform.graphics.api.buffer.states.BufferType;
import speiger.src.coreengine.platform.graphics.api.compute.ComputePipeline;
import speiger.src.coreengine.platform.graphics.api.mesh.DynamicMesh;
import speiger.src.coreengine.platform.graphics.api.mesh.Mesh;
import speiger.src.coreengine.platform.graphics.api.sampler.Sampler;
import speiger.src.coreengine.platform.graphics.api.sampler.SamplerSettings;
import speiger.src.coreengine.platform.graphics.api.shader.ShaderPipeline;
import speiger.src.coreengine.platform.graphics.api.texture.Texture;
import speiger.src.coreengine.platform.graphics.api.texture.TextureSettings;
import speiger.src.coreengine.platform.graphics.api.utils.ExecutionType;
import speiger.src.coreengine.platform.input.window.Window;

public interface GraphicsDevice {
	public static final ScopedValue<GraphicsDevice> SCOPE = ScopedValue.newInstance();
	public static GraphicsDevice get() { return SCOPE.get(); }
	
	Window window();
	GraphicsSurface createSurface();
	GraphicsCommandBuffer createCommandBuffer(ExecutionType type);
	GraphicsCommandQueue queue();
	VertexBuffer createBuffer(BufferType type, BufferState state);
	VertexBuffer createBuffer(BufferType type, BufferState state, int allocatedBytes);
	Texture createTexture(TextureSettings data, int width, int height);
	Sampler createSampler(SamplerSettings settings);
	Mesh createMesh(Mesh.Builder builder);
	DynamicMesh createDynamicMesh(DynamicMesh.Builder builder);
	TimeQueryPool createQueryPool(int size);
	void preloadPipelines(List<ShaderPipeline> graphics, List<ComputePipeline> compute);
}
