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 00055 struct iTextureHandle : public iBase 00056 { 00058 virtual int GetFlags () = 0; 00059 00061 virtual void SetKeyColor (bool Enable) = 0; 00062 00064 virtual void SetKeyColor (uint8 red, uint8 green, uint8 blue) = 0; 00065 00067 virtual bool GetKeyColor () = 0; 00068 00070 virtual void GetKeyColor (uint8 &red, uint8 &green, uint8 &blue) = 0; 00071 00082 virtual bool GetMipMapDimensions (int mipmap, int &mw, int &mh) = 0; 00083 00091 virtual void GetOriginalDimensions (int& mw, int& mh) = 0; 00092 00093 // CHANGED TO ADD SUPPORT FOR CUBEMAPS AND 3D TEXTURES 00094 // done by Phil Aumayr (phil@rarebyte.com) 00095 enum { CS_TEX_IMG_1D = 0, CS_TEX_IMG_2D, CS_TEX_IMG_3D, CS_TEX_IMG_CUBEMAP }; 00099 enum { CS_TEXTURE_CUBE_POS_X = 0, CS_TEXTURE_CUBE_NEG_X, 00100 CS_TEXTURE_CUBE_POS_Y, CS_TEXTURE_CUBE_NEG_Y, 00101 CS_TEXTURE_CUBE_POS_Z, CS_TEXTURE_CUBE_NEG_Z }; 00102 00103 #ifdef CS_USE_NEW_RENDERER 00104 00114 virtual bool GetMipMapDimensions (int mipmap, int &mw, int &mh, int &md) = 0; 00115 00123 virtual void GetOriginalDimensions (int& mw, int& mh, int &md) = 0; 00124 00133 virtual void SetTextureTarget (int target) = 0; 00134 #endif // CS_USE_NEW_RENDERER 00135 00137 virtual void GetMeanColor (uint8 &red, uint8 &green, uint8 &blue) = 0; 00138 00140 virtual void *GetCacheData () = 0; 00141 00143 virtual void SetCacheData (void *d) = 0; 00144 00149 virtual void *GetPrivateObject () = 0; 00150 00156 virtual bool GetAlphaMap () = 0; 00157 00168 virtual void Prepare () = 0; 00169 00175 virtual iGraphics2D* GetCanvas () = 0; 00176 00177 virtual csAlphaMode::AlphaType GetAlphaType () = 0; 00178 }; 00179 00182 #endif // __CS_IVIDEO_TEXTURE_H__
Generated for Crystal Space by doxygen 1.2.18