#pragma once
#include "Resource.h"

namespace gui {

	/**
	 * A buffer that can store some form of typed data for shaders.
	 *
	 * Used as a base class for vertex buffers and for constant buffers inside the pipeline objects.
	 * This is so that the fancy wrappers inside Storm can use a unified interface to access the
	 * data.
	 */
	class ShaderBuffer : public Resource3D {
		STORM_ABSTRACT_CLASS;
	public:
		// Create.
		STORM_CTOR ShaderBuffer();

	protected:
		// Get the address of an element.
		virtual UNKNOWN(PTR_NOGC) void *STORM_FN at(Nat id) ABSTRACT;

		// Get the address of an element and mark it as dirty.
		virtual UNKNOWN(PTR_NOGC) void *STORM_FN atMark(Nat id) ABSTRACT;
	};

}
