Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages
texture.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 1998, 2000 by Jorrit Tyberghein 00003 2004 by Marten Svanfeldt 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00020 #ifndef __CS_IVIDEO_TEXTURE_H__ 00021 #define __CS_IVIDEO_TEXTURE_H__ 00022 00031 #include "csutil/scf.h" 00032 #include "cstypes.h" 00033 #include "ivideo/graph3d.h" 00034 00035 struct iGraphics2D; 00036 struct iGraphics3D; 00037 00038 SCF_VERSION (iTextureHandle, 2, 4, 1); 00039 00056 struct iTextureHandle : public iBase 00057 { 00059 virtual int GetFlags () const = 0; 00060 00062 virtual void SetKeyColor (bool Enable) = 0; 00063 00065 virtual void SetKeyColor (uint8 red, uint8 green, uint8 blue) = 0; 00066 00068 virtual bool GetKeyColor () const = 0; 00069 00071 virtual void GetKeyColor (uint8 &red, uint8 &green, uint8 &blue) const = 0; 00072 00082 virtual bool GetRendererDimensions (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 00096 { 00097 CS_TEX_IMG_1D = 0, 00098 CS_TEX_IMG_2D, 00099 CS_TEX_IMG_3D, 00100 CS_TEX_IMG_CUBEMAP, 00101 CS_TEX_IMG_RECT 00102 }; 00106 enum { CS_TEXTURE_CUBE_POS_X = 0, CS_TEXTURE_CUBE_NEG_X, 00107 CS_TEXTURE_CUBE_POS_Y, CS_TEXTURE_CUBE_NEG_Y, 00108 CS_TEXTURE_CUBE_POS_Z, CS_TEXTURE_CUBE_NEG_Z }; 00109 00110 00120 virtual bool GetRendererDimensions (int &mw, int &mh, int &md) = 0; 00121 00129 virtual void GetOriginalDimensions (int& mw, int& mh, int &md) = 0; 00130 00135 virtual int GetTextureTarget () const = 0; 00136 00138 enum TextureBlitDataFormat 00139 { 00141 RGBA8888 = 0, 00143 BGRA8888 00144 }; 00145 00150 virtual void Blit (int x, int y, int width, int height, 00151 unsigned char const* data, TextureBlitDataFormat format = RGBA8888) = 0; 00152 00156 virtual const char* GetImageName () const = 0; 00157 00159 virtual void *GetCacheData () = 0; 00160 00162 virtual void SetCacheData (void *d) = 0; 00163 00168 virtual void *GetPrivateObject () = 0; 00169 00175 virtual bool GetAlphaMap () = 0; 00176 00178 virtual csAlphaMode::AlphaType GetAlphaType () const = 0; 00179 00184 virtual void Precache () = 0; 00185 00196 virtual void SetTextureClass (const char* className) = 0; 00201 virtual const char* GetTextureClass () = 0; 00202 00209 virtual void SetAlphaType (csAlphaMode::AlphaType alphaType) = 0; 00210 }; 00211 00214 #endif // __CS_IVIDEO_TEXTURE_H__
Generated for Crystal Space by doxygen 1.4.4