CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

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 
00033 struct iGraphics2D;
00034 struct iGraphics3D;
00035 
00036 SCF_VERSION (iTextureHandle, 2, 2, 2);
00037 
00041 struct iTextureHandle : public iBase
00042 {
00044   virtual int GetFlags () = 0;
00045 
00047   virtual void SetKeyColor (bool Enable) = 0;
00048 
00050   virtual void SetKeyColor (uint8 red, uint8 green, uint8 blue) = 0;
00051 
00053   virtual bool GetKeyColor () = 0;
00054 
00056   virtual void GetKeyColor (uint8 &red, uint8 &green, uint8 &blue) = 0;
00057 
00068   virtual bool GetMipMapDimensions (int mipmap, int &mw, int &mh) = 0;
00069 
00077   virtual void GetOriginalDimensions (int& mw, int& mh) = 0;
00078 
00079 #ifdef CS_USE_NEW_RENDERER
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 
00100   virtual bool GetMipMapDimensions (int mipmap, int &mw, int &mh, int &md) = 0;
00101 
00109   virtual void GetOriginalDimensions (int& mw, int& mh, int &md) = 0;
00110 
00119   virtual void SetTextureTarget(int target) = 0;
00120 
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 
00150   virtual void Prepare () = 0;
00151 
00157   virtual iGraphics2D* GetCanvas () = 0;
00158 };
00159 
00162 #endif // __CS_IVIDEO_TEXTURE_H__

Generated for Crystal Space by doxygen 1.2.14