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

import speiger.src.coreengine.math.vector.floats.Vec4f;
import speiger.src.coreengine.platform.graphics.api.shader.states.GraphicsDataType;
import speiger.src.coreengine.platform.graphics.api.target.RenderTarget;
import speiger.src.coreengine.platform.graphics.api.texture.Texture;
import speiger.src.coreengine.platform.graphics.api.texture.states.TextureFormat;
import speiger.src.coreengine.platform.graphics.api.utils.PushableResource;

public interface GraphicsCommandQueue {
	public static final int CLEAR_COLOR = 1;
	public static final int CLEAR_DEPTH = 2;
	public static final int CLEAR_BOTH = 3;
	public PushableResource putClearColor(Vec4f color);
	public PushableResource putClearDepth(double value);
	public PushableResource putRenderTarget(RenderTarget target);
	public PushableResource pushViewPort(int x, int y, int width, int height);
	
	public void clearTexture(int clearParam);
	public void clearTexture(int x, int y, int width, int height, int clearParam);
	public void clearTexture(Texture texture, int clearParam);
	public void clearTexture(Texture texture, int x, int y, int width, int height, int clearParam);
	
	public void writeToTexture(Texture target, TextureFormat format, GraphicsDataType dataType, long source);
	public default void writeToTexture(Texture target, int level, int x, int y, int width, int height, TextureFormat format, GraphicsDataType dataType, long source) {
		writeToTexture(target, level, 0, 0, x, y, width, height, format, dataType, source);
	}
	public void writeToTexture(Texture target, int level, int sourceX, int sourceY, int targetX, int targetY, int width, int height, TextureFormat format, GraphicsDataType dataType, long source);
	
	public void submitCommands(CommandBuffer buffer);
	
	public GraphicsFence createFence();
	public long currentFrame();
	public void submitFrame();
}