ivideo/texture.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 1998, 2000 by Jorrit Tyberghein 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public 00015 License along with this library; if not, write to the Free 00016 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #ifndef __CS_IVIDEO_TEXTURE_H__ 00020 #define __CS_IVIDEO_TEXTURE_H__ 00021 00030 #include "csutil/scf.h" 00031 #include "cstypes.h" 00032 #include "ivideo/graph3d.h" 00033 00034 struct iGraphics2D; 00035 struct iGraphics3D; 00036 00037 SCF_VERSION (iTextureHandle, 2, 2, 2); 00038 00042 struct iTextureHandle : public iBase 00043 { 00045 virtual int GetFlags () = 0; 00046 00048 virtual void SetKeyColor (bool Enable) = 0; 00049 00051 virtual void SetKeyColor (uint8 red, uint8 green, uint8 blue) = 0; 00052 00054 virtual bool GetKeyColor () = 0; 00055 00057 virtual void GetKeyColor (uint8 &red, uint8 &green, uint8 &blue) = 0; 00058 00069 virtual bool GetMipMapDimensions (int mipmap, int &mw, int &mh) = 0; 00070 00078 virtual void GetOriginalDimensions (int& mw, int& mh) = 0; 00079 00080 // CHANGED TO ADD SUPPORT FOR CUBEMAPS AND 3D TEXTURES 00081 // done by Phil Aumayr (phil@rarebyte.com) 00082 enum { CS_TEX_IMG_1D = 0, CS_TEX_IMG_2D, CS_TEX_IMG_3D, CS_TEX_IMG_CUBEMAP }; 00086 enum { CS_TEXTURE_CUBE_POS_X = 0, CS_TEXTURE_CUBE_NEG_X, 00087 CS_TEXTURE_CUBE_POS_Y, CS_TEXTURE_CUBE_NEG_Y, 00088 CS_TEXTURE_CUBE_POS_Z, CS_TEXTURE_CUBE_NEG_Z }; 00089 00090 #ifdef CS_USE_NEW_RENDERER 00091 00101 virtual bool GetMipMapDimensions (int mipmap, int &mw, int &mh, int &md) = 0; 00102 00110 virtual void GetOriginalDimensions (int& mw, int& mh, int &md) = 0; 00111 00120 virtual void SetTextureTarget (int target) = 0; 00121 #endif // CS_USE_NEW_RENDERER 00122 00124 virtual void GetMeanColor (uint8 &red, uint8 &green, uint8 &blue) = 0; 00125 00127 virtual void *GetCacheData () = 0; 00128 00130 virtual void SetCacheData (void *d) = 0; 00131 00136 virtual void *GetPrivateObject () = 0; 00137 00143 virtual bool GetAlphaMap () = 0; 00144 00155 virtual void Prepare () = 0; 00156 00162 virtual iGraphics2D* GetCanvas () = 0; 00163 00164 virtual csAlphaMode::AlphaType GetAlphaType () = 0; 00165 }; 00166 00169 #endif // __CS_IVIDEO_TEXTURE_H__
Generated for Crystal Space by doxygen 1.2.18