1 /******************************************************************************
2 * Arachnoid Graphics Plugin for Mupen64Plus
3 * http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
5 * Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 *****************************************************************************/
22 #ifndef CACHED_TEXTURE_H_
23 #define CACHED_TEXTURE_H_
25 //*****************************************************************************
27 //! Struct used by Texture Cache to store used textures.
28 //*****************************************************************************
33 //Constructor / Destrucotr
37 //Activate / Deactivate
42 unsigned int getTextureSize() { return m_textureSize; }
45 CachedTexture& operator = (const CachedTexture& v);
48 bool operator == (const CachedTexture& t) const;
52 unsigned int m_id; //!< id used by OpenGL to identify texture
53 unsigned int m_textureSize; //!< Size of texture in bytes
56 unsigned int crc; //!< A CRC "checksum" (Cyclic redundancy check)
58 // unsigned short ulS, ulT, lrS, lrT;
59 float offsetS, offsetT;
60 unsigned int maskS, maskT;
61 unsigned int clampS, clampT;
62 unsigned int mirrorS, mirrorT;
65 unsigned int format; //!< Texture format
67 unsigned int palette; //!< What Texture Look Up Table to use
68 unsigned int width, height; //!< N64 width and height
69 unsigned int clampWidth, clampHeight; //!< Size to clamp to
70 unsigned int realWidth, realHeight; //!< Actual texture size
71 float scaleS, scaleT; //!< Scale to map to 0.0-1.0
72 float shiftScaleS, shiftScaleT; //!< Scale to shift
73 // unsigned int lastDList;
74 // unsigned int frameBufferTexture;