2009-02-09 21:15:56 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2007-2009 Gabest
|
|
|
|
* http://www.gabest.org
|
|
|
|
*
|
|
|
|
* This Program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This Program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with GNU Make; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "GSVector.h"
|
|
|
|
|
|
|
|
class GSTexture
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GSVector2 m_scale;
|
|
|
|
|
|
|
|
public:
|
|
|
|
GSTexture() : m_scale(1, 1) {}
|
|
|
|
virtual ~GSTexture() {}
|
|
|
|
|
|
|
|
enum {None, RenderTarget, DepthStencil, Texture, Offscreen};
|
|
|
|
|
|
|
|
virtual operator bool() = 0;
|
2009-06-06 10:11:22 +00:00
|
|
|
|
2009-02-09 21:15:56 +00:00
|
|
|
virtual int GetType() const = 0;
|
|
|
|
virtual int GetWidth() const = 0;
|
|
|
|
virtual int GetHeight() const = 0;
|
|
|
|
virtual int GetFormat() const = 0;
|
2009-06-06 10:11:22 +00:00
|
|
|
|
2009-05-14 16:41:52 +00:00
|
|
|
virtual bool Update(const GSVector4i& r, const void* data, int pitch) = 0;
|
2009-05-28 02:57:01 +00:00
|
|
|
virtual bool Map(uint8** bits, int& pitch, const GSVector4i* r = NULL) = 0;
|
2009-02-09 21:15:56 +00:00
|
|
|
virtual void Unmap() = 0;
|
2009-05-11 08:18:00 +00:00
|
|
|
virtual bool Save(const string& fn, bool dds = false) = 0;
|
2009-02-09 21:15:56 +00:00
|
|
|
|
2009-05-22 01:22:52 +00:00
|
|
|
GSVector2i GetSize() const {return GSVector2i(GetWidth(), GetHeight());}
|
2009-02-09 21:15:56 +00:00
|
|
|
};
|