/*
	ZDimensionTexture.hpp
	Author: James Russell <jcrussell@762studios.com>
	Created: 7/1/2012

	Purpose: 

	'Dimension' (1D, 2D, 3D) Texture Interface.

	License:

	TODO

*/

#pragma once

#ifndef _ZDIMENSIONTEXTURE_HPP
#define _ZDIMENSIONTEXTURE_HPP

#include <ZUtil/ZBitmap.hpp>

#include <ZRenderer/ZTexture.hpp>

//Two dimensional texture interface class
class ZDimensionTexture : public ZTexture
{
public:
	//Virtual Destructor
	virtual ~ZDimensionTexture() { }

	/*
	virtual public ZDimensionTexture::Fill
	
	Fills this texture with the data given in the bitmap data structure.
	
	@param _data - the bitmap data
	@return (bool) - true if able to fill the texture, false if unable (contested or locked)
	@context (all)
	*/
	virtual bool Fill(const void* _data) = 0;

	/*
	virtual public ZDimensionTexture::GetBitmap
	
	Function to get the image metadata for a texture as a ZBitmap.  Does not get the
	bitmap data field in the ZBitmap instance, which is set to NULL.
	
	@return (const ZBitmapFormat) - bitmap format
	@context (all)
	*/
	virtual const ZBitmapFormat GetBitmapFormat() = 0;

	/*
	virtual public ZDimensionTexture::Map
	
	Maps this texture into memory and locks this texture until 'UnmapTexture' is called.

	The bitmap parameter is a description of how the data is laid out in memory.
	
	If the discard parameter is set to true, this tells the implementation that the data
	that is currently present in the texture is not required, and this may result in a faster
	return.
	
	@param _discard - hint to the implementation that the data in the texture can be discarded
	@return (void*) - pointer to the mapped buffer
	@context (all)
	*/
	virtual void* Map( bool _discard) = 0;

	/*
	virtual public ZDimensionTexture::Unmap
	
	Unmaps a previously mapped texture and unlocks the texture.
	
	@return (void)
	@context (all)
	*/
	virtual void Unmap() = 0;

	//Not Implemented
	virtual ZTextureType GetType() = 0;

	//Not Implemented
	virtual ZTextureUsage GetUsage() = 0;

	//Not Implemented
	virtual bool IsMipmapped() = 0;
};

#endif 
